summaryrefslogtreecommitdiffstats
path: root/Source/CPack/IFW/cmCPackIFWPackage.cxx
diff options
context:
space:
mode:
authorKonstantin Podsvirov <konstantin@podsvirov.pro>2017-09-21 18:34:33 (GMT)
committerKonstantin Podsvirov <konstantin@podsvirov.pro>2017-09-21 18:34:33 (GMT)
commit9a24ab6b6386efbfa2ea9a07a3fe10f6f013fe8c (patch)
tree04cfb8af932f01f4e1dd3a7f14049bcdcef39794 /Source/CPack/IFW/cmCPackIFWPackage.cxx
parent46f7a6707bd11f277a11ad7cc59adcbb1077407c (diff)
downloadCMake-9a24ab6b6386efbfa2ea9a07a3fe10f6f013fe8c.zip
CMake-9a24ab6b6386efbfa2ea9a07a3fe10f6f013fe8c.tar.gz
CMake-9a24ab6b6386efbfa2ea9a07a3fe10f6f013fe8c.tar.bz2
CPackIFW: Add some options
The `CPackIFW` module `cpack_ifw_configure_component` and `cpack_ifw_configure_component_group` commands gained a new `REPLACES` and `CHECKABLE` options.
Diffstat (limited to 'Source/CPack/IFW/cmCPackIFWPackage.cxx')
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.cxx37
1 files changed, 37 insertions, 0 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index 7b23005..d3ce15c 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -482,6 +482,15 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
this->ForcedInstallation = "false";
}
+ // Replaces
+ option = prefix + "REPLACES";
+ if (this->IsSetToEmpty(option)) {
+ this->Replaces.clear();
+ } else if (const char* value = this->GetOption(option)) {
+ this->Replaces.clear();
+ cmSystemTools::ExpandListArgument(value, this->Replaces);
+ }
+
// Requires admin rights
option = prefix + "REQUIRES_ADMIN_RIGHTS";
if (this->IsSetToEmpty(option)) {
@@ -492,6 +501,16 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
this->RequiresAdminRights = "false";
}
+ // Checkable
+ option = prefix + "CHECKABLE";
+ if (this->IsSetToEmpty(option)) {
+ this->Checkable.clear();
+ } else if (this->IsOn(option)) {
+ this->Checkable = "true";
+ } else if (this->IsSetToOff(option)) {
+ this->Checkable = "false";
+ }
+
return 1;
}
@@ -652,6 +671,19 @@ void cmCPackIFWPackage::GeneratePackageFile()
xout.Element("ForcedInstallation", this->ForcedInstallation);
}
+ // Replaces
+ if (!this->Replaces.empty()) {
+ std::ostringstream replaces;
+ std::vector<std::string>::iterator it = this->Replaces.begin();
+ replaces << *it;
+ ++it;
+ while (it != this->Replaces.end()) {
+ replaces << "," << *it;
+ ++it;
+ }
+ xout.Element("Replaces", replaces.str());
+ }
+
if (!this->RequiresAdminRights.empty()) {
xout.Element("RequiresAdminRights", this->RequiresAdminRights);
}
@@ -672,6 +704,11 @@ void cmCPackIFWPackage::GeneratePackageFile()
xout.Element("SortingPriority", this->SortingPriority);
}
+ // Checkable
+ if (!this->Checkable.empty()) {
+ xout.Element("Checkable", this->Checkable);
+ }
+
xout.EndElement();
xout.EndDocument();
}