diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2018-11-02 12:42:41 -0400 |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2018-11-07 14:08:48 -0500 |
commit | 9fc20a4f3e1865e409d960c87e2e4a366775b72b (patch) | |
tree | 5ea698da30b881b7ad4db2e3770e27727f93fcb9 /Source/cmInstallCommandArguments.cxx | |
parent | 71db32660eed1f70c06b624e661f8f5c2b938907 (diff) | |
download | cmake-9fc20a4f3e1865e409d960c87e2e4a366775b72b.tar.gz |
install: Add sane set of defaults for DESTINATION and file type parameters
If the user does not specify a DESTINATION for a target type, the
install() command checks to see if the appropriate variable from
GNUInstallDirs is set. If it is not, then it uses an appropriate
hard-coded guess.
In addition, for FILES and DIRECTORY, the user can specify a file
type instead of a DESTINATION, and the command will use the
appropriate variable from GNUInstallDirs, or a hard-coded guess if
it is not set.
Diffstat (limited to 'Source/cmInstallCommandArguments.cxx')
-rw-r--r-- | Source/cmInstallCommandArguments.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx index 2d6dc12956..63bdb00afe 100644 --- a/Source/cmInstallCommandArguments.cxx +++ b/Source/cmInstallCommandArguments.cxx @@ -29,6 +29,7 @@ cmInstallCommandArguments::cmInstallCommandArguments( , Optional(&Parser, "OPTIONAL", &ArgumentGroup) , NamelinkOnly(&Parser, "NAMELINK_ONLY", &ArgumentGroup) , NamelinkSkip(&Parser, "NAMELINK_SKIP", &ArgumentGroup) + , Type(&Parser, "TYPE", &ArgumentGroup) , GenericArguments(nullptr) , DefaultComponentName(defaultComponent) { @@ -145,6 +146,11 @@ bool cmInstallCommandArguments::HasNamelinkComponent() const return false; } +const std::string& cmInstallCommandArguments::GetType() const +{ + return this->Type.GetString(); +} + const std::vector<std::string>& cmInstallCommandArguments::GetConfigurations() const { |