Change: Use default NewGRF cargo translation table. (#12646)
[openttd-github.git] / cmake / PackageBundle.cmake
blobe737c020052b076a4b7b1ddc8c8bd5f03d5e5d3d
1 string(TIMESTAMP CURRENT_YEAR "%Y")
3 set(CPACK_BUNDLE_NAME "OpenTTD")
4 set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/os/macosx/openttd.icns")
5 set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
6 set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/os/macosx/splash.png")
7 set(CPACK_BUNDLE_APPLE_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/os/macosx/openttd.entitlements")
8 set(CPACK_DMG_FORMAT "UDBZ")
10 # Create a temporary Info.plist.in, where we will fill in the version via
11 # CPackProperties.cmake.in. This because at this point in time the version
12 # is not yet known.
13 configure_file("${CMAKE_SOURCE_DIR}/os/macosx/Info.plist.in" "${CMAKE_CURRENT_BINARY_DIR}/Info.plist.in")
14 set(CPACK_BUNDLE_PLIST_SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Info.plist.in")
16 # Delay fixup_bundle() till the install step; this makes sure all executables
17 # exists and it can do its job.
18 install(
19     CODE
20     "
21         include(BundleUtilities)
22         set(BU_CHMOD_BUNDLE_ITEMS TRUE)
23         fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/../MacOS/openttd\"  \"\" \"\")
24     "
25     DESTINATION .
26     COMPONENT Runtime)