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/cmInstallCommand.h | |
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/cmInstallCommand.h')
-rw-r--r-- | Source/cmInstallCommand.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h index 8bd0159330..202c438103 100644 --- a/Source/cmInstallCommand.h +++ b/Source/cmInstallCommand.h @@ -11,6 +11,7 @@ #include "cmCommand.h" class cmExecutionStatus; +class cmInstallCommandArguments; /** \class cmInstallCommand * \brief Specifies where to install some files @@ -45,6 +46,27 @@ private: std::vector<std::string>& absFiles); bool CheckCMP0006(bool& failure); + std::string GetDestination(const cmInstallCommandArguments* args, + const std::string& varName, + const std::string& guess); + std::string GetRuntimeDestination(const cmInstallCommandArguments* args); + std::string GetSbinDestination(const cmInstallCommandArguments* args); + std::string GetArchiveDestination(const cmInstallCommandArguments* args); + std::string GetLibraryDestination(const cmInstallCommandArguments* args); + std::string GetIncludeDestination(const cmInstallCommandArguments* args); + std::string GetSysconfDestination(const cmInstallCommandArguments* args); + std::string GetSharedStateDestination(const cmInstallCommandArguments* args); + std::string GetLocalStateDestination(const cmInstallCommandArguments* args); + std::string GetRunStateDestination(const cmInstallCommandArguments* args); + std::string GetDataRootDestination(const cmInstallCommandArguments* args); + std::string GetDataDestination(const cmInstallCommandArguments* args); + std::string GetInfoDestination(const cmInstallCommandArguments* args); + std::string GetLocaleDestination(const cmInstallCommandArguments* args); + std::string GetManDestination(const cmInstallCommandArguments* args); + std::string GetDocDestination(const cmInstallCommandArguments* args); + std::string GetDestinationForType(const cmInstallCommandArguments* args, + const std::string& type); + std::string DefaultComponentName; }; |