diff options
author | Alexander Smorkalov <alexander.smorkalov@itseez.com> | 2016-05-10 14:31:23 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-13 10:46:03 -0400 |
commit | 23baaf8d73ff76e1f32d8dcc7ea837943f130872 (patch) | |
tree | b565bcad00992788e6ce1b88bd6967692a258670 /Modules | |
parent | 3a55a0e72c216cfe6536e7d8e5c72e3f3e5d65b4 (diff) | |
download | cmake-23baaf8d73ff76e1f32d8dcc7ea837943f130872.tar.gz |
CPack/Deb inter package dependencies
In multi-component setup dependencies
between packages are set (breaking change)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CPackDeb.cmake | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 3e5758bd3c..5ceb30bbf6 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -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 () |