Fix RPM architecture value -- we were using amd64 but it should be x86_64

This commit is contained in:
casey langen 2023-07-29 11:55:10 -07:00
parent f7a29021c6
commit eafe29e94f

View File

@ -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()