From e7eb69320af6ae14fd225b85aeb9f36934a9fd48 Mon Sep 17 00:00:00 2001 From: Bram Tertoolen Date: Thu, 25 Jul 2024 12:17:13 +0200 Subject: [PATCH] Determine debian architecture using dpkg (#137) --- install/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/CMakeLists.txt b/install/CMakeLists.txt index 31e5964d..d33401ea 100644 --- a/install/CMakeLists.txt +++ b/install/CMakeLists.txt @@ -79,7 +79,11 @@ set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") if(UNIX) # DEB package if(NOT DEBARCH) - set(DEBARCH ${CMAKE_SYSTEM_PROCESSOR}) + execute_process( + COMMAND dpkg --print-architecture + OUTPUT_VARIABLE DEBARCH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) endif() message(STATUS "Configure DEB packaging for Linux ${DEBARCH}") list(APPEND CPACK_GENERATOR DEB)