summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-01-24 13:50:43 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-01-24 13:50:43 (GMT)
commitbaec299ecd350f0b82489e928a770c3ce081958a (patch)
tree6744d4bde46e41e742d9afb0fd481afed17948fc /Modules
parent74588925229cb4b3df319fd084c2481c2f962fbc (diff)
downloadCMake-baec299ecd350f0b82489e928a770c3ce081958a.zip
CMake-baec299ecd350f0b82489e928a770c3ce081958a.tar.gz
CMake-baec299ecd350f0b82489e928a770c3ce081958a.tar.bz2
CPack: Fix regression in Deb description
Fixes: #20254
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPack.cmake3
-rw-r--r--Modules/Internal/CPack/CPackDeb.cmake3
2 files changed, 4 insertions, 2 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index a1cc71d..c2ed3de 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -458,12 +458,13 @@ if(NOT DEFINED CPACK_PACKAGE_VERSION)
endif()
_cpack_set_default(CPACK_PACKAGE_VENDOR "Humanity")
+set(CPACK_DEFAULT_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_NAME} built using CMake")
if(CMAKE_PROJECT_DESCRIPTION)
_cpack_set_default(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"${CMAKE_PROJECT_DESCRIPTION}")
else()
_cpack_set_default(CPACK_PACKAGE_DESCRIPTION_SUMMARY
- "${CMAKE_PROJECT_NAME} built using CMake")
+ "${CPACK_DEFAULT_PACKAGE_DESCRIPTION_SUMMARY}")
endif()
if(CMAKE_PROJECT_HOMEPAGE_URL)
_cpack_set_default(CPACK_PACKAGE_HOMEPAGE_URL
diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake
index 3927b1a..97906ca 100644
--- a/Modules/Internal/CPack/CPackDeb.cmake
+++ b/Modules/Internal/CPack/CPackDeb.cmake
@@ -540,7 +540,8 @@ function(cpack_deb_prepare_package_vars)
# Ok, description has set. According to the `Debian Policy Manual`_ the frist
# line is a pacakge summary. Try to get it as well...
# See also: https://www.debian.org/doc/debian-policy/ch-controlfields.html#description
- elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+ elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY AND
+ NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY STREQUAL CPACK_DEFAULT_PACKAGE_DESCRIPTION_SUMMARY)
# Merge summary w/ the detailed description
string(PREPEND CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n")
endif()