From 7ee0eb7e9c24d3d05c5ae011ae5b92161826fa21 Mon Sep 17 00:00:00 2001 From: Lorenzo Fontana Date: Tue, 13 Oct 2020 17:00:50 +0200 Subject: [PATCH] update: cpack specify architecture for debian packages Signed-off-by: Lorenzo Fontana --- cmake/modules/CPackConfig.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake/modules/CPackConfig.cmake b/cmake/modules/CPackConfig.cmake index 2f7f2988..9cacedeb 100644 --- a/cmake/modules/CPackConfig.cmake +++ b/cmake/modules/CPackConfig.cmake @@ -30,9 +30,15 @@ if(NOT CPACK_GENERATOR) endif() message(STATUS "Using package generators: ${CPACK_GENERATOR}") - +message(STATUS "Package architecture: ${CMAKE_SYSTEM_PROCESSOR}") set(CPACK_DEBIAN_PACKAGE_SECTION "utils") -set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") + +if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") +endif() +if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64") + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64") +endif() set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://www.falco.org") set(CPACK_DEBIAN_PACKAGE_DEPENDS "dkms (>= 2.1.0.0)") set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA