summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-24 17:54:00 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-05-24 17:54:00 (GMT)
commit384de98709ee6b8bf49c2d52b89d04d09a7c4b58 (patch)
tree7e9c05c41ea5cd73182dcc4843d290e7e2e99bc1 /Modules
parent185be83815228fd25ab568757d5a9f3286ae01c0 (diff)
parent4f3b97063f724f5e0a2902e8d2c104012b52b7f5 (diff)
downloadCMake-384de98709ee6b8bf49c2d52b89d04d09a7c4b58.zip
CMake-384de98709ee6b8bf49c2d52b89d04d09a7c4b58.tar.gz
CMake-384de98709ee6b8bf49c2d52b89d04d09a7c4b58.tar.bz2
Merge topic 'cpack-deb-component-depends'
4f3b9706 CPack/Deb prevent accidental component dependencies
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPackDeb.cmake36
1 files changed, 23 insertions, 13 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index d93d924..70bf81d 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -100,6 +100,13 @@
#
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (< 2.4)")
#
+# .. variable:: CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS
+#
+# Sets inter component dependencies if listed with
+# :variable:`CPACK_COMPONENT_<compName>_DEPENDS` variables.
+#
+# * Mandatory : NO
+# * Default : -
#
# .. variable:: CPACK_DEBIAN_PACKAGE_MAINTAINER
#
@@ -713,20 +720,23 @@ 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(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS)
+ 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)
- 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}")
+ 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()
endif()