Commit 23baaf8d authored by Alexander Smorkalov's avatar Alexander Smorkalov Committed by Brad King

CPack/Deb inter package dependencies

In multi-component setup dependencies
between packages are set (breaking change)
parent 3a55a0e7
......@@ -698,6 +698,22 @@ function(cpack_deb_prepare_package_vars)
endif()
endif()
endforeach()
set(COMPONENT_DEPENDS "")
foreach (_PACK ${CPACK_COMPONENT_${_local_component_name}_DEPENDS})
get_component_package_name(_PACK_NAME "${_PACK}")
if(COMPONENT_DEPENDS)
set(COMPONENT_DEPENDS "${_PACK_NAME} (= ${CPACK_DEBIAN_PACKAGE_VERSION}), ${COMPONENT_DEPENDS}")
else()
set(COMPONENT_DEPENDS "${_PACK_NAME} (= ${CPACK_DEBIAN_PACKAGE_VERSION})")
endif()
endforeach()
if(COMPONENT_DEPENDS)
if(CPACK_DEBIAN_PACKAGE_DEPENDS)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${COMPONENT_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
else()
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${COMPONENT_DEPENDS}")
endif()
endif()
endif()
# at this point, the CPACK_DEBIAN_PACKAGE_DEPENDS is properly set
......@@ -705,7 +721,7 @@ function(cpack_deb_prepare_package_vars)
# Append automatically discovered dependencies .
if(NOT "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}" STREQUAL "")
if (CPACK_DEBIAN_PACKAGE_DEPENDS)
set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
else ()
set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
endif ()
......
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