Merge trunk up to revision 40611
[blender.git] / source / blenderplayer / CMakeLists.txt
index 7c1daedce71153cc6bb5730830abdf8f95c4858d..eadd796348d4e7d5d51b5a8f38edda1af8f5afa2 100644 (file)
@@ -63,8 +63,18 @@ if(WIN32 AND NOT UNIX)
        endif()
 
        add_executable(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc)
+
 elseif(APPLE)
-       add_executable(blenderplayer MACOSX_BUNDLE ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
+       add_executable(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
+       # setup Info.plist
+       execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BLENDER_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
+       set(PLAYER_SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blenderplayer.app)
+       set(PLAYER_SOURCEINFO ${PLAYER_SOURCEDIR}/Contents/Info.plist)
+       set_target_properties(blenderplayer PROPERTIES
+               MACOSX_BUNDLE_INFO_PLIST ${PLAYER_SOURCEINFO}
+               MACOSX_BUNDLE_SHORT_VERSION_STRING ${BLENDER_VERSION}
+               MACOSX_BUNDLE_LONG_VERSION_STRING "${BLENDER_VERSION} ${BLENDER_DATE}")
+
 else()
        add_executable(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
 endif()