summaryrefslogtreecommitdiffstats
path: root/Source/CPack
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)
commite61c2ed9acb493d1adca748088a1f34e34f9f726 (patch)
tree38dd6fa2e5a573ceacbf7911ed6f88b0e8266647 /Source/CPack
parent1d2bead8dd61e4550312dc36a24180ab2f7ff351 (diff)
parentd491f34a5ef303217aef335fdc02a8ff987a6fc8 (diff)
downloadCMake-e61c2ed9acb493d1adca748088a1f34e34f9f726.zip
CMake-e61c2ed9acb493d1adca748088a1f34e34f9f726.tar.gz
CMake-e61c2ed9acb493d1adca748088a1f34e34f9f726.tar.bz2
Merge topic 'fix-cpack-deb-description-file'
d491f34a5e CPack: Fix regression in DEB generator description Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4204
Diffstat (limited to 'Source/CPack')
-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 6003493..712eb77 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(