From eafe29e94fb06145b5b39ab3563c5a953659e791 Mon Sep 17 00:00:00 2001 From: casey langen Date: Sat, 29 Jul 2023 11:55:10 -0700 Subject: [PATCH] Fix RPM architecture value -- we were using `amd64` but it should be `x86_64` --- .cmake/GeneratePackage.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.cmake/GeneratePackage.cmake b/.cmake/GeneratePackage.cmake index 238b678ff..91bd86477 100644 --- a/.cmake/GeneratePackage.cmake +++ b/.cmake/GeneratePackage.cmake @@ -59,10 +59,16 @@ if (${GENERATE_DEB} MATCHES "true" AND CMAKE_SYSTEM_NAME MATCHES "Linux") set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${PACKAGE_ARCHITECTURE}) set(CPACK_RPM_PACKAGE_LICENSE "BSD-3-Clause") - set(CPACK_RPM_PACKAGE_ARCHITECTURE ${PACKAGE_ARCHITECTURE}) set(CPACK_RPM_PACKAGE_URL "https://www.musikcube.com") set(CPACK_RPM_PACKAGE_VERSION "${musikcube_VERSION_MAJOR}.${musikcube_VERSION_MINOR}.${musikcube_VERSION_PATCH}") set(CPACK_RPM_REQUIRES_EXCLUDE_FROM "^/.*$") + if (${PACKAGE_ARCHITECTURE} MATCHES "amd64") + # debs use `amd64`, but rpm uses `x86_64`. both seem to agree on other architecture values. + message(STATUS "[GeneratePackage] ${BoldYellow}set RPM architecture to x86_64${ColorReset}") + set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64") + else() + set(CPACK_RPM_PACKAGE_ARCHITECTURE ${PACKAGE_ARCHITECTURE}) + endif() include(CPack) endif() \ No newline at end of file