Commit 47182ab8 authored by Markus Rickert's avatar Markus Rickert Committed by Domen Vrankar

CPackDeb: set section control field per component

parent f071d8eb
......@@ -100,6 +100,7 @@
#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
# CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION
#
# * Mandatory : YES
# * Default : 'devel'
......@@ -590,18 +591,18 @@ function(cpack_deb_prepare_package_vars)
# You should set: DEBIAN_PACKAGE_DEPENDS
# TODO: automate 'objdump -p | grep NEEDED'
# if per-component dependency, overrides the global CPACK_DEBIAN_PACKAGE_${dependency_type_}
# 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(dependency_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES SOURCE)
set(_component_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_${dependency_type_}")
foreach(value_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES SOURCE SECTION)
set(_component_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_${value_type_}")
# if set, overrides the global dependency
# if set, overrides the global variable
if(DEFINED ${_component_var})
set(CPACK_DEBIAN_PACKAGE_${dependency_type_} "${${_component_var}}")
set(CPACK_DEBIAN_PACKAGE_${value_type_} "${${_component_var}}")
if(CPACK_DEBIAN_PACKAGE_DEBUG)
message("CPackDeb Debug: component '${_local_component_name}' ${dependency_type_} "
"dependencies set to '${CPACK_DEBIAN_PACKAGE_${dependency_type_}}'")
message("CPackDeb Debug: component '${_local_component_name}' ${value_type_} "
"value set to '${CPACK_DEBIAN_PACKAGE_${value_type_}}'")
endif()
endif()
endforeach()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment