Advanced CMake option to build the player without blender: WITH_BLENDER

This commit is contained in:
Campbell Barton 2011-07-13 08:15:06 +00:00
parent b0ffa7fc58
commit cf485cd963
4 changed files with 93 additions and 74 deletions

@ -90,6 +90,9 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE )
get_blender_version()
# Blender internal features
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
mark_as_advanced(WITH_BLENDER)
option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
@ -210,6 +213,10 @@ endif()
#-----------------------------------------------------------------------------
# Check for conflicting/unsupported configurations
if(NOT WITH_BLENDER AND NOT WITH_PLAYER)
message(FATAL_ERROR "At least one of WITH_BLENDER or WITH_PLAYER must be enabled, nothing to do!")
endif()
if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
endif()
@ -1223,7 +1230,9 @@ add_subdirectory(extern)
#-----------------------------------------------------------------------------
# Blender Application
if(WITH_BLENDER)
add_subdirectory(source/creator)
endif()
#-----------------------------------------------------------------------------

@ -74,7 +74,6 @@ set(SRC
intern/GHOST_EventKey.h
intern/GHOST_EventManager.h
intern/GHOST_EventNDOF.h
intern/GHOST_EventPrinter.h
intern/GHOST_EventString.h
intern/GHOST_EventTrackpad.h
intern/GHOST_EventWheel.h

@ -19,10 +19,10 @@
#
# ***** END GPL LICENSE BLOCK *****
if(WITH_BLENDER)
add_subdirectory(animation)
add_subdirectory(armature)
add_subdirectory(curve)
add_subdirectory(datafiles)
add_subdirectory(gpencil)
add_subdirectory(interface)
add_subdirectory(mesh)
@ -55,3 +55,6 @@ add_subdirectory(space_view3d)
add_subdirectory(transform)
add_subdirectory(util)
add_subdirectory(uvedit)
endif()
add_subdirectory(datafiles)

@ -27,15 +27,22 @@ set(INC_SYS
)
# blender and player
set(SRC
Bfont.c
bfont.ttf.c
bmonofont.ttf.c
)
if(WITH_BLENDER)
# blender only
list(APPEND SRC
startup.blend.c
preview.blend.c
bmonofont.ttf.c
)
if(NOT WITH_HEADLESS)
# blender UI only
list(APPEND SRC
splash.png.c
blenderbuttons.c
@ -72,5 +79,6 @@ if(NOT WITH_HEADLESS)
vertexdraw.png.c
)
endif()
endif()
blender_add_lib(bf_editor_datafiles "${SRC}" "${INC}" "${INC_SYS}")