diff --git a/package.cmake b/package.cmake index 9dd6fa3d9c8b2..e47339554a7d2 100644 --- a/package.cmake +++ b/package.cmake @@ -4,11 +4,6 @@ # SPDX-License-Identifier: MIT # -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(CPACK_PACKAGE_ARCHITECTURE "x86_64") -else() - set(CPACK_PACKAGE_ARCHITECTURE "x86") -endif() set(CPACK_PACKAGE_RELOCATABLE FALSE) set(CPACK_PACKAGE_NAME "intel") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Intel(R) Graphics Compute Runtime") @@ -94,12 +89,20 @@ if(UNIX) endif() set(CPACK_SET_DESTDIR TRUE) - set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") + # Architecture-related options + if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64|arm64") + set(CPACK_PACKAGE_ARCHITECTURE "arm64") + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64") + set(CPACK_RPM_PACKAGE_ARCHITECTURE "arm64") + else() + set(CPACK_PACKAGE_ARCHITECTURE "x86_64") + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") + set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64") + endif() set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "postinst;postrm") set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://01.org/compute-runtime") set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_RPM_COMPRESSION_TYPE "xz") - set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64") set(CPACK_RPM_PACKAGE_AUTOREQ OFF) set(CPACK_RPM_PACKAGE_DESCRIPTION "Intel OpenCL GPU driver") set(CPACK_RPM_PACKAGE_GROUP "System Environment/Libraries")