1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmAddLibraryCommand.h,v $
6 Date: $Date: 2008-01-23 15:27:59 $
7 Version: $Revision: 1.20 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmLibrarysCommand_h
18 #define cmLibrarysCommand_h
20 #include "cmCommand.h"
22 /** \class cmLibrarysCommand
23 * \brief Defines a list of executables to build.
25 * cmLibrarysCommand defines a list of executable (i.e., test)
28 class cmAddLibraryCommand
: public cmCommand
32 * This is a virtual constructor for the command.
34 virtual cmCommand
* Clone()
36 return new cmAddLibraryCommand
;
40 * This is called when the command is first encountered in
41 * the CMakeLists.txt file.
43 virtual bool InitialPass(std::vector
<std::string
> const& args
,
44 cmExecutionStatus
&status
);
47 * The name of the command as specified in CMakeList.txt.
49 virtual const char* GetName() { return "add_library";}
52 * Succinct documentation.
54 virtual const char* GetTerseDocumentation()
56 return "Add a library to the project using the specified source files.";
62 virtual const char* GetFullDocumentation()
65 " add_library(libname [SHARED | STATIC | MODULE] [EXCLUDE_FROM_ALL]\n"
66 " source1 source2 ... sourceN)\n"
67 "Adds a library target. SHARED, STATIC or MODULE keywords are used "
68 "to set the library type. If the keyword MODULE appears, the library "
69 "type is set to MH_BUNDLE on systems which use dyld. On systems "
70 "without dyld, MODULE is treated like SHARED. If no keywords appear "
71 " as the second argument, the type defaults to the current value of "
72 "BUILD_SHARED_LIBS. If this variable is not set, the type defaults "
74 "If EXCLUDE_FROM_ALL is given the target will not be built by default. "
75 "It will be built only if the user explicitly builds the target or "
76 "another target that requires the target depends on it.";
79 cmTypeMacro(cmAddLibraryCommand
, cmCommand
);