You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.5 KiB

  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 cmLinkLibrariesCommand_h
  14. #define cmLinkLibrariesCommand_h
  15. #include "cmCommand.h"
  16. /** \class cmLinkLibrariesCommand
  17. * \brief Specify a list of libraries to link into executables.
  18. *
  19. * cmLinkLibrariesCommand 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 cmLinkLibrariesCommand : public cmCommand
  24. {
  25. public:
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmLinkLibrariesCommand;
  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. * The name of the command as specified in CMakeList.txt.
  40. */
  41. virtual const char* GetName() { return "link_libraries";}
  42. /**
  43. * Succinct documentation.
  44. */
  45. virtual const char* GetTerseDocumentation()
  46. {
  47. return "Deprecated. Use the target_link_libraries() command instead.";
  48. }
  49. /**
  50. * More documentation.
  51. */
  52. virtual const char* GetFullDocumentation()
  53. {
  54. return
  55. "Link libraries to all targets added later.\n"
  56. " link_libraries(library1 <debug | optimized> library2 ...)\n"
  57. "Specify a list of libraries to be linked into "
  58. "any following targets (typically added with the add_executable "
  59. "or add_library calls). This command is passed "
  60. "down to all subdirectories. "
  61. "The debug and optimized strings may be used to indicate that "
  62. "the next library listed is to be used only for that specific "
  63. "type of build.";
  64. }
  65. /** This command is kept for compatibility with older CMake versions. */
  66. virtual bool IsDiscouraged()
  67. {
  68. return true;
  69. }
  70. cmTypeMacro(cmLinkLibrariesCommand, cmCommand);
  71. };
  72. #endif