Use dpkg --print-architecture also for RPM generator.

This commit is contained in:
Andreas Schuh 2014-03-20 04:24:57 +00:00
parent e8890f274a
commit a49a656f1e

View file

@ -37,6 +37,7 @@ elseif (CPACK_GENERATOR MATCHES "DEB")
if (NOT RV EQUAL 0)
set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
endif ()
set (CPACK_DEBIAN_PACKAGE_DEPENDS)
set (CPACK_DEBIAN_PACKAGE_SECTION "devel")
set (CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
@ -47,6 +48,15 @@ elseif (CPACK_GENERATOR MATCHES "DEB")
# RPM package
elseif (CPACK_GENERATOR MATCHES "RPM")
execute_process (
COMMAND dpkg --print-architecture
RESULT_VARIABLE RV
OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
)
if (NOT RV EQUAL 0)
set (CPACK_RPM_PACKAGE_ARCHITECTURE i386)
endif ()
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
if (DEVEL)
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-devel")