From 271e03f089999d01860b6fcac35505f8a539884e Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 10 May 2016 14:55:52 +0200 Subject: [PATCH] CPack/Deb per-component package architecture Allowed to set per-compoment Debian package architecture. Useful, if you distribute documentation (should have "all architecture"). --- Modules/CPackDeb.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 5ceb30bbf..227e1b1b5 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -52,6 +52,7 @@ # # # .. variable:: CPACK_DEBIAN_PACKAGE_ARCHITECTURE +# CPACK_DEBIAN__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)