summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2020-12-12 16:29:09 +0100
committerPatric Stout <github@truebrain.nl>2020-12-19 18:26:29 +0100
commit7cdf7c7ca02d687df29575b633e2db5132a7f749 (patch)
tree3e25035f09bdf6ab998df06e74551122cd54d293 /cmake
parent2714e0a33f149185aed9ea618a38a43c1ed14217 (diff)
downloadopenttd-7cdf7c7ca02d687df29575b633e2db5132a7f749.tar.xz
Fix: [bundle] custom launch.sh is no longer required for Mac OS
Co-authored-by: Owen Rudge <owen@owenrudge.net>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/InstallAndPackage.cmake6
-rw-r--r--cmake/PackageBundle.cmake3
2 files changed, 6 insertions, 3 deletions
diff --git a/cmake/InstallAndPackage.cmake b/cmake/InstallAndPackage.cmake
index 9c2ae1924..ee6522a80 100644
--- a/cmake/InstallAndPackage.cmake
+++ b/cmake/InstallAndPackage.cmake
@@ -7,7 +7,11 @@ if(OPTION_INSTALL_FHS)
set(DOCS_DESTINATION_DIR "${CMAKE_INSTALL_DOCDIR}")
set(MAN_DESTINATION_DIR "${CMAKE_INSTALL_MANDIR}")
else()
- set(BINARY_DESTINATION_DIR ".")
+ if(APPLE)
+ set(BINARY_DESTINATION_DIR "../MacOS")
+ else()
+ set(BINARY_DESTINATION_DIR ".")
+ endif()
set(DATA_DESTINATION_DIR ".")
set(DOCS_DESTINATION_DIR ".")
set(MAN_DESTINATION_DIR ".")
diff --git a/cmake/PackageBundle.cmake b/cmake/PackageBundle.cmake
index 7f96e05fa..737f4809a 100644
--- a/cmake/PackageBundle.cmake
+++ b/cmake/PackageBundle.cmake
@@ -3,7 +3,6 @@ string(TIMESTAMP CURRENT_YEAR "%Y")
set(CPACK_BUNDLE_NAME "OpenTTD")
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/os/macosx/openttd.icns")
set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
-set(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_SOURCE_DIR}/os/macosx/launch.sh")
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/os/macosx/splash.png")
set(CPACK_DMG_FORMAT "UDBZ")
@@ -20,7 +19,7 @@ install(
"
include(BundleUtilities)
set(BU_CHMOD_BUNDLE_ITEMS TRUE)
- fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/openttd\" \"\" \"\")
+ fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/../MacOS/openttd\" \"\" \"\")
"
DESTINATION .
COMPONENT Runtime)