diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-01-10 20:14:00 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-01-10 22:22:52 (GMT) |
commit | d491f34a5ef303217aef335fdc02a8ff987a6fc8 (patch) | |
tree | 5bab71882bde0ef9f87b02463dfda3adf5168fa5 /Modules | |
parent | 9fa8b7d5dda04b94fe04e63626e393fd6bf0353e (diff) | |
download | CMake-d491f34a5ef303217aef335fdc02a8ff987a6fc8.zip CMake-d491f34a5ef303217aef335fdc02a8ff987a6fc8.tar.gz CMake-d491f34a5ef303217aef335fdc02a8ff987a6fc8.tar.bz2 |
CPack: Fix regression in DEB generator description
Fixes: #20102
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CPack.cmake | 4 | ||||
-rw-r--r-- | Modules/Internal/CPack/CPackDeb.cmake | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 8a6a712..a1cc71d 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -470,8 +470,10 @@ if(CMAKE_PROJECT_HOMEPAGE_URL) "${CMAKE_PROJECT_HOMEPAGE_URL}") endif() -_cpack_set_default(CPACK_PACKAGE_DESCRIPTION_FILE +set(CPACK_DEFAULT_PACKAGE_DESCRIPTION_FILE "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") +_cpack_set_default(CPACK_PACKAGE_DESCRIPTION_FILE + "${CPACK_DEFAULT_PACKAGE_DESCRIPTION_FILE}") _cpack_set_default(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_ROOT}/Templates/CPack.GenericLicense.txt") _cpack_set_default(CPACK_RESOURCE_FILE_README diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake index ad8e078..3927b1a 100644 --- a/Modules/Internal/CPack/CPackDeb.cmake +++ b/Modules/Internal/CPack/CPackDeb.cmake @@ -498,6 +498,11 @@ function(cpack_deb_prepare_package_vars) # Description: (mandatory) # Try package description first + if(CPACK_USED_DEFAULT_PACKAGE_DESCRIPTION_FILE) + set(_desc_fallback) + else() + set(_desc_fallback "CPACK_PACKAGE_DESCRIPTION") + endif() if(CPACK_DEB_PACKAGE_COMPONENT) cpack_deb_variable_fallback("CPACK_DEBIAN_PACKAGE_DESCRIPTION" "CPACK_DEBIAN_${_local_component_name}_DESCRIPTION" @@ -505,11 +510,13 @@ function(cpack_deb_prepare_package_vars) else() cpack_deb_variable_fallback("CPACK_DEBIAN_PACKAGE_DESCRIPTION" "CPACK_DEBIAN_PACKAGE_DESCRIPTION" - "CPACK_PACKAGE_DESCRIPTION") + ${_desc_fallback}) endif() # Still no description? ... and description file has set ... - if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION AND CPACK_PACKAGE_DESCRIPTION_FILE) + if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION + AND CPACK_PACKAGE_DESCRIPTION_FILE + AND NOT CPACK_PACKAGE_DESCRIPTION_FILE STREQUAL CPACK_DEFAULT_PACKAGE_DESCRIPTION_FILE) # Read `CPACK_PACKAGE_DESCRIPTION_FILE` then... file(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_DEBIAN_PACKAGE_DESCRIPTION) endif() |