cmLinkLibrariesCommand.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #ifndef cmLinkLibrariesCommand_h
  12. #define cmLinkLibrariesCommand_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmCommand.h"
  15. /** \class cmLinkLibrariesCommand
  16. * \brief Specify a list of libraries to link into executables.
  17. *
  18. * cmLinkLibrariesCommand is used to specify a list of libraries to link
  19. * into executable(s) or shared objects. The names of the libraries
  20. * should be those defined by the LIBRARY(library) command(s).
  21. */
  22. class cmLinkLibrariesCommand : public cmCommand
  23. {
  24. public:
  25. /**
  26. * This is a virtual constructor for the command.
  27. */
  28. virtual cmCommand* Clone()
  29. {
  30. return new cmLinkLibrariesCommand;
  31. }
  32. /**
  33. * This is called when the command is first encountered in
  34. * the CMakeLists.txt file.
  35. */
  36. virtual bool Invoke(std::vector<std::string>& args);
  37. /**
  38. * This determines if the command gets propagated down
  39. * to makefiles located in subdirectories.
  40. */
  41. virtual bool IsInherited() {return true;}
  42. /**
  43. * The name of the command as specified in CMakeList.txt.
  44. */
  45. virtual const char* GetName() { return "LINK_LIBRARIES";}
  46. /**
  47. * Succinct documentation.
  48. */
  49. virtual const char* GetTerseDocumentation()
  50. {
  51. return
  52. "Specify a list of libraries to be linked into\n"
  53. "executables or shared objects.";
  54. }
  55. /**
  56. * More documentation.
  57. */
  58. virtual const char* GetFullDocumentation()
  59. {
  60. return
  61. "LINK_LIBRARIES(library1 library2)\n"
  62. "Specify a list of libraries to be linked into\n"
  63. "executables or shared objects. This command is passed\n"
  64. "down to all other commands. The library name should be\n"
  65. "the same as the name used in the LIBRARY(library) command.";
  66. }
  67. cmTypeMacro(cmLinkLibrariesCommand, cmCommand);
  68. };
  69. #endif