summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-19 20:25:27 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-19 20:25:27 (GMT)
commit96f0266228d8fdf7d420c4a562e6988830fa4996 (patch)
tree2525ae96a1752df9f6024ee4f08c84c480bbe0a6 /Source/cmInstallCommand.h
parent90c8ea1c03dea51c87fc75a38e018e5f9ce11546 (diff)
downloadCMake-96f0266228d8fdf7d420c4a562e6988830fa4996.zip
CMake-96f0266228d8fdf7d420c4a562e6988830fa4996.tar.gz
CMake-96f0266228d8fdf7d420c4a562e6988830fa4996.tar.bz2
ENH: Created new install script generation framework. The INSTALL command creates the generators which are later used by cmLocalGenerator to create the cmake_install.cmake files. A new target installation interface is provided by the INSTALL command which fixes several problems with the INSTALL_TARGETS command. See bug#2691. Bugs 1481 and 1695 are addressed by these changes.
Diffstat (limited to 'Source/cmInstallCommand.h')
-rw-r--r--Source/cmInstallCommand.h64
1 files changed, 55 insertions, 9 deletions
diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h
index 789cc79..586209e 100644
--- a/Source/cmInstallCommand.h
+++ b/Source/cmInstallCommand.h
@@ -52,7 +52,7 @@ public:
*/
virtual const char* GetTerseDocumentation()
{
- return "Install rule specification interface command.";
+ return "Specify rules to run at install time.";
}
/**
@@ -61,19 +61,65 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " INSTALL(SCRIPT <script1> [SCRIPT <script2> [...]])\n"
- "Specify rules to run at install time. If SCRIPT is given the "
- "file named after it will be included in the install scripts. "
- "Multiple SCRIPTs may be given within a single source directory "
- "and the scripts will be run in the order given. "
- "The processing order of these scripts relative to install rules "
+ "This command generates installation rules for a project. "
+ "Rules specified by calls to this command within a source directory "
+ "are executed in order during installation. "
+ "The order across directories is not defined.\n"
+ "There are multiple signatures for this command:\n"
+ " INSTALL(TARGETS [targets...] [[LIBRARY|RUNTIME]\n"
+ " [DESTINATION <destination>]\n"
+ " ] [...])\n"
+ "The TARGETS form specifies rules for installing targets from a "
+ "project. There are two kinds of target files that may be "
+ "installed: library and runtime. Static libraries and modules "
+ "are always treated as library targets. Executables are always "
+ "treated as runtime targets. For non-DLL platforms, shared libraries "
+ "are treated as library targets. For DLL platforms, the DLL part of "
+ "a shared library is treated as a runtime target and the corresponding "
+ "import library is treated as a library target. All Windows-based "
+ "systems including Cygwin are DLL platforms. The LIBRARY and RUNTIME "
+ "arguments change the type of target to which the following properties "
+ "apply. If neither is given the installation properties apply to "
+ "both target types. If only one is given then only targets of that "
+ "type will be installed (which can be used to install just a DLL or "
+ "just an import library).\n"
+ "DESTINATION arguments specify the directory on disk to which the "
+ "target file will be installed. "
+ "If a full path (with a leading slash or drive letter) is given it "
+ "is used directly. If a relative path is given it is interpreted "
+ "relative to the value of CMAKE_INSTALL_PREFIX.\n"
+ "One or more groups of properties may be specified in a single call "
+ "to the TARGETS form of this command. A target may be installed more "
+ "than once to different locations. Consider hypothetical "
+ "targets \"myExe\", \"mySharedLib\", and \"myStaticLib\". The code\n"
+ " INSTALL(TARGETS myExe mySharedLib myStaticLib\n"
+ " RUNTIME DESTINATION bin\n"
+ " LIBRARY DESTINATION lib)\n"
+ " INSTALL(TARGETS mySharedLib DESTINATION /some/full/path)\n"
+ "will install myExe to <prefix>/bin and myStaticLib to <prefix>/lib. "
+ "On non-DLL platforms mySharedLib will be installed to <prefix>/lib and "
+ "/some/full/path. On DLL platforms the mySharedLib DLL will be "
+ "installed to <prefix>/bin and /some/full/path and its import library "
+ "will be installed to <prefix>/lib and /some/full/path. On non-DLL "
+ "platforms mySharedLib will be installed to <prefix>/lib and "
+ "/some/full/path.\n"
+ " INSTALL(SCRIPT <file1> [SCRIPT <file2> [...]])\n"
+ "The SCRIPT form will invoke the given CMake script files during "
+ "installation.\n"
+ "NOTE: This command supercedes the INSTALL_TARGETS command and the "
+ "target properties PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT. "
+ "The processing order of these install rules relative to those "
"generated by INSTALL_TARGETS, INSTALL_FILES, and INSTALL_PROGRAMS "
- "commands is not specified.\n"
- "This command is a placeholder for a future larger interface."
+ "commands is not defined.\n"
;
}
cmTypeMacro(cmInstallCommand, cmCommand);
+
+private:
+ bool HandleScriptMode(std::vector<std::string> const& args);
+ bool HandleTargetsMode(std::vector<std::string> const& args);
+ void ComputeDestination(const char* destination, std::string& dest);
};