forked from bartvdbraak/blender
OSX - cmake: blenderplayer part 2: Jens Verwiever co-patch
Using OSX Bundle (in oppose to Blender dummy .app) as start point for binary. That way we don't need to move the blenderplayer after the bundle is finished and we can rebuild it without doing `make install` I will test more tomorrow, but it should be working now
This commit is contained in:
parent
8f302f7ffd
commit
aeafb960b1
@ -63,6 +63,8 @@ if(WIN32 AND NOT UNIX)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc)
|
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)
|
||||||
else()
|
else()
|
||||||
add_executable(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
|
add_executable(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
|
||||||
endif()
|
endif()
|
||||||
|
@ -711,6 +711,7 @@ elseif(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# install blenderplayer bundle - copy of blender.app above. re-using macros et al
|
# install blenderplayer bundle - copy of blender.app above. re-using macros et al
|
||||||
|
# note we are using OSX Bundle as base and copying Blender dummy bundle on top of it
|
||||||
if(WITH_GAMEENGINE AND WITH_PLAYER)
|
if(WITH_GAMEENGINE AND WITH_PLAYER)
|
||||||
set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blenderplayer.app)
|
set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blenderplayer.app)
|
||||||
set(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist)
|
set(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist)
|
||||||
@ -719,6 +720,11 @@ elseif(APPLE)
|
|||||||
# setup Info.plist
|
# setup Info.plist
|
||||||
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BLENDER_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BLENDER_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
set_target_properties(blender PROPERTIES
|
||||||
|
MACOSX_BUNDLE_INFO_PLIST ${SOURCEINFO}
|
||||||
|
MACOSX_BUNDLE_SHORT_VERSION_STRING ${BLENDER_VERSION}
|
||||||
|
MACOSX_BUNDLE_LONG_VERSION_STRING "${BLENDER_VERSION} ${BLENDER_DATE}")
|
||||||
|
|
||||||
# important to make a clean install each time else old scripts get loaded.
|
# important to make a clean install each time else old scripts get loaded.
|
||||||
install(
|
install(
|
||||||
CODE
|
CODE
|
||||||
@ -756,14 +762,6 @@ elseif(APPLE)
|
|||||||
\${TARGETDIR_VER}
|
\${TARGETDIR_VER}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# This is a hack. Blender is linked to the right place (inside the .app)
|
|
||||||
# blenderplayer not ... that also means blenderplayer is in the right place
|
|
||||||
# only when we do make install. XXX to be fixed.
|
|
||||||
install(
|
|
||||||
CODE
|
|
||||||
"file(RENAME ${TARGETDIR}/blenderplayer ${TARGETDIR}/blenderplayer.app/Contents/MacOS/blenderplayer)"
|
|
||||||
)
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user