cmTargetLinkLibrariesCommand.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmTargetLinkLibrariesCommand_h
  14. #define cmTargetLinkLibrariesCommand_h
  15. #include "cmStandardIncludes.h"
  16. #include "cmCommand.h"
  17. /** \class cmTargetLinkLibrariesCommand
  18. * \brief Specify a list of libraries to link into executables.
  19. *
  20. * cmTargetLinkLibrariesCommand is used to specify a list of libraries to link
  21. * into executable(s) or shared objects. The names of the libraries
  22. * should be those defined by the LIBRARY(library) command(s).
  23. */
  24. class cmTargetLinkLibrariesCommand : public cmCommand
  25. {
  26. public:
  27. /**
  28. * This is a virtual constructor for the command.
  29. */
  30. virtual cmCommand* Clone()
  31. {
  32. return new cmTargetLinkLibrariesCommand;
  33. }
  34. /**
  35. * This is called when the command is first encountered in
  36. * the CMakeLists.txt file.
  37. */
  38. virtual bool InitialPass(std::vector<std::string> const& args);
  39. /**
  40. * Verify that the ordering in CMake is correct.
  41. */
  42. virtual void FinalPass();
  43. /**
  44. * The name of the command as specified in CMakeList.txt.
  45. */
  46. virtual const char* GetName() { return "TARGET_LINK_LIBRARIES";}
  47. /**
  48. * Succinct documentation.
  49. */
  50. virtual const char* GetTerseDocumentation()
  51. {
  52. return
  53. "Link a target to given libraries.";
  54. }
  55. /**
  56. * More documentation.
  57. */
  58. virtual const char* GetFullDocumentation()
  59. {
  60. return
  61. " TARGET_LINK_LIBRARIES(target library1\n"
  62. " <debug | optimized> library2\n"
  63. " ...)\n"
  64. "Specify a list of libraries to be linked into the specified target "
  65. "The debug and optimized strings may be used to indicate that "
  66. "the next library listed is to be used only for that specific "
  67. "type of build";
  68. }
  69. cmTypeMacro(cmTargetLinkLibrariesCommand, cmCommand);
  70. private:
  71. std::vector<std::string> m_HasLocation;
  72. std::string m_TargetName;
  73. };
  74. #endif