Fix: [bundle] postfix the architecture for Mac OS bundles

This in preparation for other architectures, like arm64.
This commit is contained in:
Patric Stout 2020-12-12 16:29:32 +01:00 committed by Patric Stout
parent 7cdf7c7ca0
commit b8217610ce

View File

@ -76,6 +76,9 @@ if(WIN32)
set(ARCHITECTURE "win32") set(ARCHITECTURE "win32")
endif() endif()
endif() endif()
if(APPLE AND CMAKE_OSX_ARCHITECTURES)
string(TOLOWER "${CMAKE_OSX_ARCHITECTURES}" ARCHITECTURE)
endif()
set(CPACK_SYSTEM_NAME "${ARCHITECTURE}") set(CPACK_SYSTEM_NAME "${ARCHITECTURE}")
@ -98,7 +101,7 @@ if(APPLE)
set(CPACK_GENERATOR "Bundle") set(CPACK_GENERATOR "Bundle")
include(PackageBundle) 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) elseif(WIN32)
set(CPACK_GENERATOR "ZIP") set(CPACK_GENERATOR "ZIP")
if(OPTION_USE_NSIS) if(OPTION_USE_NSIS)