summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMarkus Rickert <rickert@fortiss.org>2015-11-08 22:44:00 (GMT)
committerBrad King <brad.king@kitware.com>2015-11-09 14:57:48 (GMT)
commita45a4b2d86bf7d03d690433c3b1299ace1e6dbe0 (patch)
treedb30fb568b9fddcdd85530e9942587783bc40564 /Modules
parenta60574f1bfbb5a153b7e55cf5183be93ac50bea0 (diff)
downloadCMake-a45a4b2d86bf7d03d690433c3b1299ace1e6dbe0.zip
CMake-a45a4b2d86bf7d03d690433c3b1299ace1e6dbe0.tar.gz
CMake-a45a4b2d86bf7d03d690433c3b1299ace1e6dbe0.tar.bz2
CPackDeb: set package control field per component
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPackDeb.cmake12
1 files changed, 7 insertions, 5 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 722dca4..7e9eb86 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -27,6 +27,7 @@
# However as a handy reminder here comes the list of specific variables:
#
# .. variable:: CPACK_DEBIAN_PACKAGE_NAME
+# CPACK_DEBIAN_<COMPONENT>_PACKAGE_NAME
#
# The Debian package summary
#
@@ -603,7 +604,7 @@ function(cpack_deb_prepare_package_vars)
# if per-component variable, overrides the global CPACK_DEBIAN_PACKAGE_${variable_type_}
# automatic dependency discovery will be performed afterwards.
if(CPACK_DEB_PACKAGE_COMPONENT)
- foreach(value_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES SOURCE SECTION PRIORITY)
+ foreach(value_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES SOURCE SECTION PRIORITY NAME)
set(_component_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_${value_type_}")
# if set, overrides the global variable
@@ -704,10 +705,11 @@ function(cpack_deb_prepare_package_vars)
endif()
endforeach()
- set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "-${CPACK_DEB_PACKAGE_COMPONENT}")
- string(TOLOWER "${CPACK_PACKAGE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
- else()
- set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
+ if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_NAME)
+ string(TOLOWER "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
+ else()
+ string(TOLOWER "${CPACK_DEBIAN_PACKAGE_NAME}-${CPACK_DEB_PACKAGE_COMPONENT}" CPACK_DEBIAN_PACKAGE_NAME)
+ endif()
endif()
# Print out some debug information if we were asked for that