diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2018-04-18 18:53:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-03 12:08:37 (GMT) |
commit | 0212d7c7629bb1a866da4f6c69b780c6d43f26f3 (patch) | |
tree | ea32f0aa311f23569ff0168c0446be4d831f93a2 /Source/cmInstallCommandArguments.cxx | |
parent | cbb609072f00ee6aec3fdfb6e54ed2b3a747e840 (diff) | |
download | CMake-0212d7c7629bb1a866da4f6c69b780c6d43f26f3.zip CMake-0212d7c7629bb1a866da4f6c69b780c6d43f26f3.tar.gz CMake-0212d7c7629bb1a866da4f6c69b780c6d43f26f3.tar.bz2 |
install: add NAMELINK_COMPONENT argument
For shared libraries, this allows you to specify separate components
for the shared library and for the namelink.
Suggested in https://cmake.org/pipermail/cmake-developers/2014-December/024032.html.
Diffstat (limited to 'Source/cmInstallCommandArguments.cxx')
-rw-r--r-- | Source/cmInstallCommandArguments.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx index 7b79ab5..2d6dc12 100644 --- a/Source/cmInstallCommandArguments.cxx +++ b/Source/cmInstallCommandArguments.cxx @@ -21,6 +21,7 @@ cmInstallCommandArguments::cmInstallCommandArguments( , ArgumentGroup() , Destination(&Parser, "DESTINATION", &ArgumentGroup) , Component(&Parser, "COMPONENT", &ArgumentGroup) + , NamelinkComponent(&Parser, "NAMELINK_COMPONENT", &ArgumentGroup) , ExcludeFromAll(&Parser, "EXCLUDE_FROM_ALL", &ArgumentGroup) , Rename(&Parser, "RENAME", &ArgumentGroup) , Permissions(&Parser, "PERMISSIONS", &ArgumentGroup) @@ -59,6 +60,14 @@ const std::string& cmInstallCommandArguments::GetComponent() const return unspecifiedComponent; } +const std::string& cmInstallCommandArguments::GetNamelinkComponent() const +{ + if (!this->NamelinkComponent.GetString().empty()) { + return this->NamelinkComponent.GetString(); + } + return this->GetComponent(); +} + const std::string& cmInstallCommandArguments::GetRename() const { if (!this->Rename.GetString().empty()) { @@ -125,6 +134,17 @@ bool cmInstallCommandArguments::GetNamelinkSkip() const return false; } +bool cmInstallCommandArguments::HasNamelinkComponent() const +{ + if (!this->NamelinkComponent.GetString().empty()) { + return true; + } + if (this->GenericArguments != nullptr) { + return this->GenericArguments->HasNamelinkComponent(); + } + return false; +} + const std::vector<std::string>& cmInstallCommandArguments::GetConfigurations() const { |