summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlexander Smorkalov <alexander.smorkalov@itseez.com>2016-05-10 12:55:52 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-13 14:46:03 (GMT)
commit271e03f089999d01860b6fcac35505f8a539884e (patch)
treed550c95f5503a0f9c07dece605084a4514304f04 /Modules
parent23baaf8d73ff76e1f32d8dcc7ea837943f130872 (diff)
downloadCMake-271e03f089999d01860b6fcac35505f8a539884e.zip
CMake-271e03f089999d01860b6fcac35505f8a539884e.tar.gz
CMake-271e03f089999d01860b6fcac35505f8a539884e.tar.bz2
CPack/Deb per-component package architecture
Allowed to set per-compoment Debian package architecture. Useful, if you distribute documentation (should have "all architecture").
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPackDeb.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 5ceb30b..227e1b1 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -52,6 +52,7 @@
#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+# CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE
#
# The Debian package architecture
#
@@ -654,7 +655,9 @@ function(cpack_deb_prepare_package_vars)
endif()
# Architecture: (mandatory)
- if(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ if(CPACK_DEB_PACKAGE_COMPONENT AND CPACK_DEBIAN_${_local_component_name}_PACKAGE_ARCHITECTURE)
+ set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_ARCHITECTURE}")
+ elseif(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
# There is no such thing as i686 architecture on debian, you should use i386 instead
# $ dpkg --print-architecture
find_program(DPKG_CMD dpkg)