diff options
author | Jacques Beuarain <jacques.beaurain@gmail.com> | 2006-12-06 03:28:13 +0300 |
---|---|---|
committer | Jacques Beuarain <jacques.beaurain@gmail.com> | 2006-12-06 03:28:13 +0300 |
commit | 227987292197191e1fc6bc71774c02aada2dbd5a (patch) | |
tree | 3d3ccc2d9798f1c8b5974be98fcc8d30a6194b9e /source/creator | |
parent | 593d9ae738b1a80706ecf85b473e2fe84b11fca1 (diff) |
CMake: Proper bundle for blender binary for Mac OS X and just keep blenderplayer as regular binary as with download from blender3d.org
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 887e664a940..05b221c1dff 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -49,12 +49,41 @@ IF(WITH_QUICKTIME) ADD_DEFINITIONS(-DWITH_QUICKTIME) ENDIF(WITH_QUICKTIME) +MESSAGE(STATUS "Configuring blender") + IF(WIN32) ADD_EXECUTABLE(blender ${EXETYPE} creator.c ../blender/makesdna/intern/dna.c ../icons/winblender.rc) ELSE(WIN32) ADD_EXECUTABLE(blender ${EXETYPE} creator.c ../blender/makesdna/intern/dna.c) ENDIF(WIN32) +IF(APPLE) + SET(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app) + SET(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist) + SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/blender.app) + SET(TARGETINFO ${TARGETDIR}/Contents/Info.plist) + + ADD_CUSTOM_COMMAND(TARGET blender + POST_BUILD + MAIN_DEPENDENCY blender + COMMAND cp -R ${SOURCEINFO} ${TARGETDIR}/Contents/ + COMMAND cp -R ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/Contents/ + COMMAND cp -R ${SOURCEDIR}/Contents/Resources ${TARGETDIR}/Contents/ + COMMAND cat ${SOURCEINFO} | sed s/VERSION/`cat ${CMAKE_SOURCE_DIR}/release/VERSION`/ | sed s/DATE/`date +'%Y-%b-%d'`/ > ${TARGETINFO} + COMMAND rm -Rf ${TARGETDIR}/Contents/MacOS/.blender + COMMAND mkdir ${TARGETDIR}/Contents/MacOS/.blender/ + COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/Contents/MacOS/.blender/ + COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/Contents/MacOS/.blender/ + COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/Contents/Resources/ + COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/Contents/MacOS/.blender/ + COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/Contents/Resources/ + COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/Contents/MacOS/.blender/ + COMMAND find ${TARGETDIR} -name CVS -prune -exec rm -rf {} "\;" + COMMAND find ${TARGETDIR} -name CVS.sandboxinfo -prune -exec rm -rf {} "\;" + COMMAND find ${TARGETDIR} -name .DS_Store -prune -exec rm -rf {} "\;" + ) +ENDIF(APPLE) + ADD_DEPENDENCIES(blender makesdna) SETUP_LIBLINKS(blender) @@ -143,4 +172,3 @@ ELSE(UNIX) TARGET_LINK_LIBRARIES(blender ${BLENDER_LINK_LIBS}) ENDIF(UNIX) -MESSAGE(STATUS "Configuring blender") |