Cycles: Add a cmake config to easily compile Cycles Standalone.
On Linux/Mac OS X, simply type "make cycles" inside the Blender source directory, to get a standalone build of the engine. Reviewed by: Brecht Differential Revision: https://developer.blender.org/D228
This commit is contained in:
@@ -2255,10 +2255,16 @@ endif()
|
||||
#-----------------------------------------------------------------------------
|
||||
# Libraries
|
||||
|
||||
if(WITH_BLENDER OR WITH_PLAYER)
|
||||
add_subdirectory(source)
|
||||
add_subdirectory(intern)
|
||||
add_subdirectory(extern)
|
||||
|
||||
elseif(WITH_CYCLES_STANDALONE)
|
||||
add_subdirectory(intern/cycles)
|
||||
if(WITH_CYCLES_STANDALONE_GUI)
|
||||
add_subdirectory(extern/glew)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Blender Application
|
||||
|
@@ -56,6 +56,10 @@ ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_lite
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake"
|
||||
endif
|
||||
ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_cycles
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake"
|
||||
endif
|
||||
ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_bpy
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake"
|
||||
@@ -126,6 +130,7 @@ all:
|
||||
|
||||
debug: all
|
||||
lite: all
|
||||
cycles: all
|
||||
headless: all
|
||||
bpy: all
|
||||
|
||||
@@ -144,6 +149,7 @@ help:
|
||||
@echo " * debug - build a debug binary"
|
||||
@echo " * lite - disable non essential features for a smaller binary and faster build"
|
||||
@echo " * headless - build without an interface (renderfarm or server automation)"
|
||||
@echo " * cycles - build Cycles standalone only, without Blender"
|
||||
@echo " * bpy - build as a python module which can be loaded from python directly"
|
||||
@echo ""
|
||||
@echo " * config - run cmake configuration tool to set build options"
|
||||
|
14
build_files/cmake/config/cycles_standalone.cmake
Normal file
14
build_files/cmake/config/cycles_standalone.cmake
Normal file
@@ -0,0 +1,14 @@
|
||||
# only compile Cycles standalone, without Blender
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/cycles_standalone.cmake ../blender
|
||||
#
|
||||
|
||||
# disable Blender
|
||||
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# build Cycles
|
||||
set(WITH_CYCLES_STANDALONE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_STANDALONE_GUI ON CACHE BOOL "" FORCE)
|
@@ -1,6 +1,11 @@
|
||||
|
||||
set(CYCLES_INSTALL_PATH "scripts/addons/cycles")
|
||||
# Standalone or with Blender
|
||||
if(NOT WITH_BLENDER AND WITH_CYCLES_STANDALONE)
|
||||
set(CYCLES_INSTALL_PATH "")
|
||||
else()
|
||||
set(WITH_CYCLES_BLENDER ON)
|
||||
set(CYCLES_INSTALL_PATH "scripts/addons/cycles")
|
||||
endif()
|
||||
|
||||
# External Libraries
|
||||
|
||||
@@ -101,3 +106,7 @@ add_subdirectory(render)
|
||||
add_subdirectory(subd)
|
||||
add_subdirectory(util)
|
||||
|
||||
if(NOT WITH_BLENDER AND WITH_CYCLES_STANDALONE)
|
||||
delayed_do_install(${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user