From b8217610ce11ab0b87c601e604462d8ed0f7b0f9 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sat, 12 Dec 2020 16:29:32 +0100 Subject: Fix: [bundle] postfix the architecture for Mac OS bundles This in preparation for other architectures, like arm64. --- cmake/InstallAndPackage.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/InstallAndPackage.cmake b/cmake/InstallAndPackage.cmake index ee6522a80..e6bc7a0b7 100644 --- a/cmake/InstallAndPackage.cmake +++ b/cmake/InstallAndPackage.cmake @@ -76,6 +76,9 @@ if(WIN32) set(ARCHITECTURE "win32") endif() endif() +if(APPLE AND CMAKE_OSX_ARCHITECTURES) + string(TOLOWER "${CMAKE_OSX_ARCHITECTURES}" ARCHITECTURE) +endif() set(CPACK_SYSTEM_NAME "${ARCHITECTURE}") @@ -98,7 +101,7 @@ if(APPLE) set(CPACK_GENERATOR "Bundle") include(PackageBundle) - set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-macosx") + set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-macosx-${CPACK_SYSTEM_NAME}") elseif(WIN32) set(CPACK_GENERATOR "ZIP") if(OPTION_USE_NSIS) -- cgit v1.2.3-70-g09d2