summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-01-10 20:14:00 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-01-10 22:22:52 (GMT)
commitd491f34a5ef303217aef335fdc02a8ff987a6fc8 (patch)
tree5bab71882bde0ef9f87b02463dfda3adf5168fa5 /Source/CPack
parent9fa8b7d5dda04b94fe04e63626e393fd6bf0353e (diff)
downloadCMake-d491f34a5ef303217aef335fdc02a8ff987a6fc8.zip
CMake-d491f34a5ef303217aef335fdc02a8ff987a6fc8.tar.gz
CMake-d491f34a5ef303217aef335fdc02a8ff987a6fc8.tar.bz2
CPack: Fix regression in DEB generator description
Fixes: #20102
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 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(