summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-03-03 23:44:32 (GMT)
committerBrad King <brad.king@kitware.com>2006-03-03 23:44:32 (GMT)
commita2e136fd17b693765a4961220433bdf207930583 (patch)
treeb785101e7a9fe7bed52a05e3d483216b500a4d70 /Source/cmInstallCommand.h
parent5792dc8da8a567ece9fd231e9844a5b1cd30ddc2 (diff)
downloadCMake-a2e136fd17b693765a4961220433bdf207930583.zip
CMake-a2e136fd17b693765a4961220433bdf207930583.tar.gz
CMake-a2e136fd17b693765a4961220433bdf207930583.tar.bz2
ENH: Added PERMISSIONS and RENAME options to the INSTALL command's FILES and PROGRAMS mode, and corresponding support to FILE(INSTALL). Default permissions for shared libraries on non-Windows/non-OSX platforms no longer has the execute bit set.
Diffstat (limited to 'Source/cmInstallCommand.h')
-rw-r--r--Source/cmInstallCommand.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h
index 296bc3f..c692c22 100644
--- a/Source/cmInstallCommand.h
+++ b/Source/cmInstallCommand.h
@@ -68,16 +68,29 @@ public:
"\n"
"There are multiple signatures for this command. Some of them define "
"installation properties for files and targets. Properties common to "
- "multiple signatures are covered here. DESTINATION arguments specify "
+ "multiple signatures are covered here but they are valid only for "
+ "signatures that specify them. "
+ "DESTINATION arguments specify "
"the directory on disk to which a 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."
+ "relative to the value of CMAKE_INSTALL_PREFIX. "
+ "PERMISSIONS arguments specify permissions for installed files. "
+ "Valid permissions are "
+ "OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, "
+ "GROUP_READ, GROUP_WRITE, GROUP_EXECUTE, "
+ "WORLD_READ, WORLD_WRITE, WORLD_EXECUTE, "
+ "SETUID, and SETGID. "
+ "Permissions that do not make sense on certain platforms are ignored "
+ "on those platforms. "
+ "The RENAME argument specifies a name for an installed file that "
+ "may be different from the original file. Renaming is allowed only "
+ "when a single file is installed by the command. "
"\n"
"The TARGETS signature:\n"
- " INSTALL(TARGETS [targets...] [[LIBRARY|RUNTIME]\n"
- " [DESTINATION <dir>]\n"
- " ] [...])\n"
+ " INSTALL(TARGETS targets... [[LIBRARY|RUNTIME]\n"
+ " [DESTINATION <dir>]\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 "
@@ -110,14 +123,16 @@ public:
"/some/full/path."
"\n"
"The FILES signature:\n"
- " INSTALL(FILES [files...] DESTINATION <dir>)\n"
+ " INSTALL(FILES files... DESTINATION <dir>\n"
+ " [PERMISSIONS permissions...] [RENAME <name>])\n"
"The FILES form specifies rules for installing files for a "
"project. File names given as relative paths are interpreted with "
"respect to the current source directory. Files installed by this "
"form are given the same permissions as the original file by default."
"\n"
"The PROGRAMS signature:\n"
- " INSTALL(PROGRAMS [files...] DESTINATION <dir>)\n"
+ " INSTALL(PROGRAMS files... DESTINATION <dir>\n"
+ " [PERMISSIONS permissions...] [RENAME <name>])\n"
"The PROGRAMS form is identical to the FILES form except that the "
"default permissions for the installed file mark it as executable. "
"This form is intended to install programs that are not targets, "
@@ -147,6 +162,7 @@ private:
bool HandleTargetsMode(std::vector<std::string> const& args);
bool HandleFilesMode(std::vector<std::string> const& args);
void ComputeDestination(const char* destination, std::string& dest);
+ bool CheckPermissions(std::string const& arg, std::string& permissions);
};