summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-13 15:23:17 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-13 15:23:26 (GMT)
commite8462a105ec24492cf19d7ddf640b3bb63fa1111 (patch)
tree1dbeff0ed83198de6fce5b08acd446516a92ac5c /Source
parentb1a9d49a691c8d2bd21790b5111f9594b89ac83d (diff)
parentd491f34a5ef303217aef335fdc02a8ff987a6fc8 (diff)
downloadCMake-e8462a105ec24492cf19d7ddf640b3bb63fa1111.zip
CMake-e8462a105ec24492cf19d7ddf640b3bb63fa1111.tar.gz
CMake-e8462a105ec24492cf19d7ddf640b3bb63fa1111.tar.bz2
Merge topic 'fix-cpack-deb-description-file' into release-3.16
d491f34a5e CPack: Fix regression in DEB generator description Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4204
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 9530227..6698f3c 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -125,7 +125,7 @@ int cmCPackGenerator::PrepareNames()
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Look for: CPACK_PACKAGE_DESCRIPTION_FILE" << std::endl);
const char* descFileName = this->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE");
- if (descFileName) {
+ if (descFileName && !this->GetOption("CPACK_PACKAGE_DESCRIPTION")) {
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Look for: " << descFileName << std::endl);
if (!cmSystemTools::FileExists(descFileName)) {
@@ -149,7 +149,12 @@ int cmCPackGenerator::PrepareNames()
while (ifs && cmSystemTools::GetLineFromStream(ifs, line)) {
ostr << cmXMLSafe(line) << std::endl;
}
- this->SetOptionIfNotSet("CPACK_PACKAGE_DESCRIPTION", ostr.str().c_str());
+ this->SetOption("CPACK_PACKAGE_DESCRIPTION", ostr.str().c_str());
+ const char* defFileName =
+ this->GetOption("CPACK_DEFAULT_PACKAGE_DESCRIPTION_FILE");
+ if (defFileName && !strcmp(defFileName, descFileName)) {
+ this->SetOption("CPACK_USED_DEFAULT_PACKAGE_DESCRIPTION_FILE", "ON");
+ }
}
if (!this->GetOption("CPACK_PACKAGE_DESCRIPTION")) {
cmCPackLogger(