Advanced CMake option to build the player without blender: WITH_BLENDER
This commit is contained in:
@@ -90,6 +90,9 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE )
|
|||||||
get_blender_version()
|
get_blender_version()
|
||||||
|
|
||||||
# Blender internal features
|
# 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_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
|
||||||
|
|
||||||
option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
|
option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
|
||||||
@@ -210,6 +213,10 @@ endif()
|
|||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Check for conflicting/unsupported configurations
|
# 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)
|
if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
|
||||||
message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
|
message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
|
||||||
endif()
|
endif()
|
||||||
@@ -1223,7 +1230,9 @@ add_subdirectory(extern)
|
|||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Blender Application
|
# Blender Application
|
||||||
add_subdirectory(source/creator)
|
if(WITH_BLENDER)
|
||||||
|
add_subdirectory(source/creator)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ set(SRC
|
|||||||
intern/GHOST_EventKey.h
|
intern/GHOST_EventKey.h
|
||||||
intern/GHOST_EventManager.h
|
intern/GHOST_EventManager.h
|
||||||
intern/GHOST_EventNDOF.h
|
intern/GHOST_EventNDOF.h
|
||||||
intern/GHOST_EventPrinter.h
|
|
||||||
intern/GHOST_EventString.h
|
intern/GHOST_EventString.h
|
||||||
intern/GHOST_EventTrackpad.h
|
intern/GHOST_EventTrackpad.h
|
||||||
intern/GHOST_EventWheel.h
|
intern/GHOST_EventWheel.h
|
||||||
|
|||||||
@@ -19,39 +19,42 @@
|
|||||||
#
|
#
|
||||||
# ***** END GPL LICENSE BLOCK *****
|
# ***** END GPL LICENSE BLOCK *****
|
||||||
|
|
||||||
add_subdirectory(animation)
|
if(WITH_BLENDER)
|
||||||
add_subdirectory(armature)
|
add_subdirectory(animation)
|
||||||
add_subdirectory(curve)
|
add_subdirectory(armature)
|
||||||
|
add_subdirectory(curve)
|
||||||
|
add_subdirectory(gpencil)
|
||||||
|
add_subdirectory(interface)
|
||||||
|
add_subdirectory(mesh)
|
||||||
|
add_subdirectory(metaball)
|
||||||
|
add_subdirectory(object)
|
||||||
|
add_subdirectory(physics)
|
||||||
|
add_subdirectory(render)
|
||||||
|
add_subdirectory(screen)
|
||||||
|
add_subdirectory(sculpt_paint)
|
||||||
|
add_subdirectory(sound)
|
||||||
|
add_subdirectory(space_action)
|
||||||
|
add_subdirectory(space_api)
|
||||||
|
add_subdirectory(space_buttons)
|
||||||
|
add_subdirectory(space_console)
|
||||||
|
add_subdirectory(space_file)
|
||||||
|
add_subdirectory(space_graph)
|
||||||
|
add_subdirectory(space_image)
|
||||||
|
add_subdirectory(space_info)
|
||||||
|
add_subdirectory(space_logic)
|
||||||
|
add_subdirectory(space_nla)
|
||||||
|
add_subdirectory(space_node)
|
||||||
|
add_subdirectory(space_outliner)
|
||||||
|
add_subdirectory(space_script)
|
||||||
|
add_subdirectory(space_sequencer)
|
||||||
|
add_subdirectory(space_sound)
|
||||||
|
add_subdirectory(space_text)
|
||||||
|
add_subdirectory(space_time)
|
||||||
|
add_subdirectory(space_userpref)
|
||||||
|
add_subdirectory(space_view3d)
|
||||||
|
add_subdirectory(transform)
|
||||||
|
add_subdirectory(util)
|
||||||
|
add_subdirectory(uvedit)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(datafiles)
|
add_subdirectory(datafiles)
|
||||||
add_subdirectory(gpencil)
|
|
||||||
add_subdirectory(interface)
|
|
||||||
add_subdirectory(mesh)
|
|
||||||
add_subdirectory(metaball)
|
|
||||||
add_subdirectory(object)
|
|
||||||
add_subdirectory(physics)
|
|
||||||
add_subdirectory(render)
|
|
||||||
add_subdirectory(screen)
|
|
||||||
add_subdirectory(sculpt_paint)
|
|
||||||
add_subdirectory(sound)
|
|
||||||
add_subdirectory(space_action)
|
|
||||||
add_subdirectory(space_api)
|
|
||||||
add_subdirectory(space_buttons)
|
|
||||||
add_subdirectory(space_console)
|
|
||||||
add_subdirectory(space_file)
|
|
||||||
add_subdirectory(space_graph)
|
|
||||||
add_subdirectory(space_image)
|
|
||||||
add_subdirectory(space_info)
|
|
||||||
add_subdirectory(space_logic)
|
|
||||||
add_subdirectory(space_nla)
|
|
||||||
add_subdirectory(space_node)
|
|
||||||
add_subdirectory(space_outliner)
|
|
||||||
add_subdirectory(space_script)
|
|
||||||
add_subdirectory(space_sequencer)
|
|
||||||
add_subdirectory(space_sound)
|
|
||||||
add_subdirectory(space_text)
|
|
||||||
add_subdirectory(space_time)
|
|
||||||
add_subdirectory(space_userpref)
|
|
||||||
add_subdirectory(space_view3d)
|
|
||||||
add_subdirectory(transform)
|
|
||||||
add_subdirectory(util)
|
|
||||||
add_subdirectory(uvedit)
|
|
||||||
|
|||||||
@@ -27,50 +27,58 @@ set(INC_SYS
|
|||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# blender and player
|
||||||
set(SRC
|
set(SRC
|
||||||
Bfont.c
|
Bfont.c
|
||||||
bfont.ttf.c
|
bfont.ttf.c
|
||||||
bmonofont.ttf.c
|
|
||||||
startup.blend.c
|
|
||||||
preview.blend.c
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT WITH_HEADLESS)
|
if(WITH_BLENDER)
|
||||||
|
# blender only
|
||||||
list(APPEND SRC
|
list(APPEND SRC
|
||||||
splash.png.c
|
startup.blend.c
|
||||||
blenderbuttons.c
|
preview.blend.c
|
||||||
|
bmonofont.ttf.c
|
||||||
# brushes
|
|
||||||
add.png.c
|
|
||||||
blob.png.c
|
|
||||||
blur.png.c
|
|
||||||
clay.png.c
|
|
||||||
clone.png.c
|
|
||||||
crease.png.c
|
|
||||||
darken.png.c
|
|
||||||
draw.png.c
|
|
||||||
fill.png.c
|
|
||||||
flatten.png.c
|
|
||||||
grab.png.c
|
|
||||||
inflate.png.c
|
|
||||||
layer.png.c
|
|
||||||
lighten.png.c
|
|
||||||
mix.png.c
|
|
||||||
multiply.png.c
|
|
||||||
nudge.png.c
|
|
||||||
pinch.png.c
|
|
||||||
prvicons.c
|
|
||||||
scrape.png.c
|
|
||||||
smear.png.c
|
|
||||||
smooth.png.c
|
|
||||||
snake_hook.png.c
|
|
||||||
soften.png.c
|
|
||||||
subtract.png.c
|
|
||||||
texdraw.png.c
|
|
||||||
thumb.png.c
|
|
||||||
twist.png.c
|
|
||||||
vertexdraw.png.c
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(NOT WITH_HEADLESS)
|
||||||
|
# blender UI only
|
||||||
|
list(APPEND SRC
|
||||||
|
splash.png.c
|
||||||
|
blenderbuttons.c
|
||||||
|
|
||||||
|
# brushes
|
||||||
|
add.png.c
|
||||||
|
blob.png.c
|
||||||
|
blur.png.c
|
||||||
|
clay.png.c
|
||||||
|
clone.png.c
|
||||||
|
crease.png.c
|
||||||
|
darken.png.c
|
||||||
|
draw.png.c
|
||||||
|
fill.png.c
|
||||||
|
flatten.png.c
|
||||||
|
grab.png.c
|
||||||
|
inflate.png.c
|
||||||
|
layer.png.c
|
||||||
|
lighten.png.c
|
||||||
|
mix.png.c
|
||||||
|
multiply.png.c
|
||||||
|
nudge.png.c
|
||||||
|
pinch.png.c
|
||||||
|
prvicons.c
|
||||||
|
scrape.png.c
|
||||||
|
smear.png.c
|
||||||
|
smooth.png.c
|
||||||
|
snake_hook.png.c
|
||||||
|
soften.png.c
|
||||||
|
subtract.png.c
|
||||||
|
texdraw.png.c
|
||||||
|
thumb.png.c
|
||||||
|
twist.png.c
|
||||||
|
vertexdraw.png.c
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
blender_add_lib(bf_editor_datafiles "${SRC}" "${INC}" "${INC_SYS}")
|
blender_add_lib(bf_editor_datafiles "${SRC}" "${INC}" "${INC_SYS}")
|
||||||
|
|||||||
Reference in New Issue
Block a user