diff options
-rw-r--r-- | Help/cpack_gen/deb.rst | 11 | ||||
-rw-r--r-- | Modules/Internal/CPack/CPackDeb.cmake | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Help/cpack_gen/deb.rst b/Help/cpack_gen/deb.rst index a4063d9..15f94dc 100644 --- a/Help/cpack_gen/deb.rst +++ b/Help/cpack_gen/deb.rst @@ -182,11 +182,22 @@ List of CPack DEB generator specific variables: only the automatically discovered dependencies will be set for this component. + .. versionchanged:: 3.31 + + The variable is always expanded as a list. Before it was expanded only + if used in cooperation with :variable:`CPACK_DEB_COMPONENT_INSTALL`, + :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS` or + :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS`. + This meant that if a component had no shared libraries discovered + (e.g. a package composed only of scripts) you had to join the list + by yourself to obtain a valid Depends field. + Example: .. code-block:: cmake set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (< 2.4)") + list(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS cmake) .. variable:: CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake index 2b58ab1..98e6d18 100644 --- a/Modules/Internal/CPack/CPackDeb.cmake +++ b/Modules/Internal/CPack/CPackDeb.cmake @@ -589,7 +589,6 @@ function(cpack_deb_prepare_package_vars) list(JOIN COMPONENT_DEPENDS ", " COMPONENT_DEPENDS) if(COMPONENT_DEPENDS) list(PREPEND CPACK_DEBIAN_PACKAGE_DEPENDS ${COMPONENT_DEPENDS}) - list(JOIN CPACK_DEBIAN_PACKAGE_DEPENDS ", " CPACK_DEBIAN_PACKAGE_DEPENDS) endif() endif() endif() @@ -599,9 +598,9 @@ function(cpack_deb_prepare_package_vars) # Append automatically discovered dependencies . if(CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS) list(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}) - list(JOIN CPACK_DEBIAN_PACKAGE_DEPENDS ", " CPACK_DEBIAN_PACKAGE_DEPENDS) endif() + list(JOIN CPACK_DEBIAN_PACKAGE_DEPENDS ", " CPACK_DEBIAN_PACKAGE_DEPENDS) if(NOT CPACK_DEBIAN_PACKAGE_DEPENDS) message(STATUS "CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.") endif() |