summaryrefslogtreecommitdiff
path: root/Source/cmInstallCommandArguments.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2018-04-18 14:53:10 -0400
committerBrad King <brad.king@kitware.com>2018-05-03 08:08:37 -0400
commit0212d7c7629bb1a866da4f6c69b780c6d43f26f3 (patch)
treeea32f0aa311f23569ff0168c0446be4d831f93a2 /Source/cmInstallCommandArguments.cxx
parentcbb609072f00ee6aec3fdfb6e54ed2b3a747e840 (diff)
downloadcmake-0212d7c7629bb1a866da4f6c69b780c6d43f26f3.tar.gz
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.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx
index 7b79ab5c8d..2d6dc12956 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
{