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.

82 lines
2.5 KiB

20 years ago
  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 cmLibrarysCommand_h
  14. #define cmLibrarysCommand_h
  15. #include "cmCommand.h"
  16. /** \class cmLibrarysCommand
  17. * \brief Defines a list of executables to build.
  18. *
  19. * cmLibrarysCommand defines a list of executable (i.e., test)
  20. * programs to create.
  21. */
  22. class cmAddLibraryCommand : public cmCommand
  23. {
  24. public:
  25. /**
  26. * This is a virtual constructor for the command.
  27. */
  28. virtual cmCommand* Clone()
  29. {
  30. return new cmAddLibraryCommand;
  31. }
  32. /**
  33. * This is called when the command is first encountered in
  34. * the CMakeLists.txt file.
  35. */
  36. virtual bool InitialPass(std::vector<std::string> const& args);
  37. /**
  38. * The name of the command as specified in CMakeList.txt.
  39. */
  40. virtual const char* GetName() { return "add_library";}
  41. /**
  42. * Succinct documentation.
  43. */
  44. virtual const char* GetTerseDocumentation()
  45. {
  46. return "Add a library to the project using the specified source files.";
  47. }
  48. /**
  49. * More documentation.
  50. */
  51. virtual const char* GetFullDocumentation()
  52. {
  53. return
  54. " add_library(libname [SHARED | STATIC | MODULE] [EXCLUDE_FROM_ALL]\n"
  55. " source1 source2 ... sourceN)\n"
  56. "Adds a library target. SHARED, STATIC or MODULE keywords are used "
  57. "to set the library type. If the keyword MODULE appears, the library "
  58. "type is set to MH_BUNDLE on systems which use dyld. On systems "
  59. "without dyld, MODULE is treated like SHARED. If no keywords appear "
  60. " as the second argument, the type defaults to the current value of "
  61. "BUILD_SHARED_LIBS. If this variable is not set, the type defaults "
  62. "to STATIC.\n"
  63. "If EXCLUDE_FROM_ALL is given the target will not be built by default. "
  64. "It will be built only if the user explicitly builds the target or "
  65. "another target that requires the target depends on it.";
  66. }
  67. cmTypeMacro(cmAddLibraryCommand, cmCommand);
  68. };
  69. #endif