cmTargetLinkLibrariesCommand.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 "cmCommand.h"
  16. /** \class cmTargetLinkLibrariesCommand
  17. * \brief Specify a list of libraries to link into executables.
  18. *
  19. * cmTargetLinkLibrariesCommand is used to specify a list of libraries to link
  20. * into executable(s) or shared objects. The names of the libraries
  21. * should be those defined by the LIBRARY(library) command(s).
  22. */
  23. class cmTargetLinkLibrariesCommand : public cmCommand
  24. {
  25. public:
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmTargetLinkLibrariesCommand;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. virtual bool InitialPass(std::vector<std::string> const& args);
  38. /**
  39. * Verify that the ordering in CMake is correct.
  40. */
  41. virtual void FinalPass();
  42. /**
  43. * The name of the command as specified in CMakeList.txt.
  44. */
  45. virtual const char* GetName() { return "TARGET_LINK_LIBRARIES";}
  46. /**
  47. * Succinct documentation.
  48. */
  49. virtual const char* GetTerseDocumentation()
  50. {
  51. return
  52. "Link a target to given libraries.";
  53. }
  54. /**
  55. * More documentation.
  56. */
  57. virtual const char* GetFullDocumentation()
  58. {
  59. return
  60. " TARGET_LINK_LIBRARIES(target library1\n"
  61. " <debug | optimized> library2\n"
  62. " ...)\n"
  63. "Specify a list of libraries to be linked into the specified target. "
  64. "The debug and optimized strings may be used to indicate that "
  65. "the next library listed is to be used only for that specific "
  66. "type of build";
  67. }
  68. cmTypeMacro(cmTargetLinkLibrariesCommand, cmCommand);
  69. private:
  70. std::vector<std::string> m_HasLocation;
  71. std::string m_TargetName;
  72. };
  73. #endif