OS X: Make app bundle renamable

XCode automatically sets EXECUTABLE_NAME correctly. We have to do it by
hand if we're not using XCode.
stable-6.1
Nicolas Hake 2015-03-15 14:49:59 +01:00
parent f9e4b0568b
commit 98cd37f3d6
1 changed files with 9 additions and 0 deletions

View File

@ -1164,6 +1164,15 @@ endif()
# This expands some variables in Info.plist as a side-effect. XCode might then
# expand a second time, using the same syntax. Try not to get confused by this!
if (APPLE AND NOT CMAKE_GENERATOR STREQUAL "Xcode")
# If cross-compiling for OS X, EXECUTABLE_NAME needs to be set so it's
# expanded inside the Info.plist file. Otherwise you cannot rename the app
# bundle later.
# XXX: Make sure to fix this once we have more than one app bundle. No, I
# have no idea how.
set(EXECUTABLE_NAME openclonk)
endif()
set_target_properties(openclonk PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/src/res/Info.plist")
if(MSVC)