summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-12-21 13:01:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-12-21 13:01:34 (GMT)
commit414843599339259c6525ccc11127d8738cb83578 (patch)
tree2b83acb33bd7cca003e0742abb1e97f94843c9ab /Source
parent3ba57ddf895019b378ef0f20716e40e001d67f90 (diff)
parent739ae1d090094eea6fc545d4d1567b7db9f9683c (diff)
downloadCMake-414843599339259c6525ccc11127d8738cb83578.zip
CMake-414843599339259c6525ccc11127d8738cb83578.tar.gz
CMake-414843599339259c6525ccc11127d8738cb83578.tar.bz2
Merge topic 'cpackifw-package-remove-target-dir'
739ae1d0 CPack/IFW: Add option to control deletion of the install directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1591
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx13
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 422f5d5..bcbe84d 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -93,6 +93,15 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
}
}
+ // RemoveTargetDir
+ if (this->IsSetToOff("CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR")) {
+ this->RemoveTargetDir = "false";
+ } else if (this->IsOn("CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR")) {
+ this->RemoveTargetDir = "true";
+ } else {
+ this->RemoveTargetDir.clear();
+ }
+
// Logo
if (const char* option = this->GetOption("CPACK_IFW_PACKAGE_LOGO")) {
if (cmSystemTools::FileExists(option)) {
@@ -422,6 +431,10 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
xout.Element("MaintenanceToolIniFile", this->MaintenanceToolIniFile);
}
+ if (!this->RemoveTargetDir.empty()) {
+ xout.Element("RemoveTargetDir", this->RemoveTargetDir);
+ }
+
// Different allows
if (this->IsVersionLess("2.0")) {
// CPack IFW default policy
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h
index b635f42..37ad339 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.h
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.h
@@ -99,6 +99,10 @@ public:
/// Set to true if the installation path can contain non-ASCII characters
std::string AllowNonAsciiCharacters;
+ /// Set to false if the target directory should not be deleted when
+ /// uninstalling
+ std::string RemoveTargetDir;
+
/// Set to false if the installation path cannot contain space characters
std::string AllowSpaceInPath;