Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID).
[openttd-github.git] / cmake / PackageBundle.cmake
blob737f4809aa453bab49e5405740b4ac870c9297e2
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_DMG_FORMAT "UDBZ")
9 # Create a temporary Info.plist.in, where we will fill in the version via
10 # CPackProperties.cmake.in. This because at this point in time the version
11 # is not yet known.
12 configure_file("${CMAKE_SOURCE_DIR}/os/macosx/Info.plist.in" "${CMAKE_CURRENT_BINARY_DIR}/Info.plist.in")
13 set(CPACK_BUNDLE_PLIST_SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Info.plist.in")
15 # Delay fixup_bundle() till the install step; this makes sure all executables
16 # exists and it can do its job.
17 install(
18     CODE
19     "
20         include(BundleUtilities)
21         set(BU_CHMOD_BUNDLE_ITEMS TRUE)
22         fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/../MacOS/openttd\"  \"\" \"\")
23     "
24     DESTINATION .
25     COMPONENT Runtime)