summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2020-12-12 16:29:32 +0100
committerPatric Stout <github@truebrain.nl>2020-12-19 18:26:29 +0100
commitb8217610ce11ab0b87c601e604462d8ed0f7b0f9 (patch)
treeba11e5aab07894a33dfae8d2d2b53be31eee5be8 /cmake
parent7cdf7c7ca02d687df29575b633e2db5132a7f749 (diff)
downloadopenttd-b8217610ce11ab0b87c601e604462d8ed0f7b0f9.tar.xz
Fix: [bundle] postfix the architecture for Mac OS bundles
This in preparation for other architectures, like arm64.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/InstallAndPackage.cmake5
1 files changed, 4 insertions, 1 deletions
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)