mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 07:22:12 -05:00
added cmake configureation presets, so on *nix systems you can do...
# minal blender with debug info make debug lite # blender with no ui make headless # blender as a python module make bpy
This commit is contained in:
parent
b4df54151a
commit
93f135cfda
4 changed files with 119 additions and 6 deletions
24
GNUmakefile
24
GNUmakefile
|
@ -35,16 +35,26 @@ OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
|
|||
# Source and Build DIR's
|
||||
BLENDER_DIR:=$(shell pwd -P)
|
||||
BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build/$(OS_NCASE)
|
||||
|
||||
BUILD_TYPE:=Release
|
||||
BUILD_CMAKE_ARGS:=""
|
||||
|
||||
# support 'make debug'
|
||||
ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_debug
|
||||
BUILD_TYPE:=Debug
|
||||
else
|
||||
BUILD_TYPE:=Release
|
||||
endif
|
||||
|
||||
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 headless, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_bpy
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake
|
||||
endif
|
||||
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_bpy
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake
|
||||
endif
|
||||
|
||||
# Get the number of cores for threaded build
|
||||
NPROCS:=1
|
||||
|
@ -68,7 +78,7 @@ all:
|
|||
@echo Configuring Blender ...
|
||||
|
||||
if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
|
||||
cmake -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE) ; \
|
||||
cmake $(BUILD_CMAKE_ARGS) -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE); \
|
||||
fi
|
||||
|
||||
@echo
|
||||
|
@ -80,7 +90,9 @@ all:
|
|||
@echo
|
||||
|
||||
debug: all
|
||||
# pass
|
||||
lite: all
|
||||
headless: all
|
||||
bpy: all
|
||||
|
||||
# package types
|
||||
package_debian:
|
||||
|
|
24
build_files/cmake/config/blender_headless.cmake
Normal file
24
build_files/cmake/config/blender_headless.cmake
Normal file
|
@ -0,0 +1,24 @@
|
|||
# headless configuration, useful in for servers or renderfarms
|
||||
# builds without a windowing system (X11/Windows/Cocoa).
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_headless.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_HEADLESS ON CACHE FORCE BOOL)
|
||||
set(WITH_GAMEENGINE OFF CACHE FORCE BOOL)
|
||||
|
||||
# disable audio, its possible some devs may want this but for now disable
|
||||
# so the python module doesnt hold the audio device and loads quickly.
|
||||
set(WITH_AUDASPACE OFF CACHE FORCE BOOL)
|
||||
set(WITH_SAMPLERATE OFF CACHE FORCE BOOL)
|
||||
set(WITH_FFTW3 OFF CACHE FORCE BOOL)
|
||||
set(WITH_JACK OFF CACHE FORCE BOOL)
|
||||
set(WITH_SDL OFF CACHE FORCE BOOL)
|
||||
set(WITH_OPENAL OFF CACHE FORCE BOOL)
|
||||
set(WITH_CODEC_FFMPEG OFF CACHE FORCE BOOL)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE FORCE BOOL)
|
||||
|
||||
# other features which are not especially useful as a python module
|
||||
set(WITH_X11_XINPUT OFF CACHE FORCE BOOL)
|
||||
set(WITH_INPUT_NDOF OFF CACHE FORCE BOOL)
|
43
build_files/cmake/config/blender_lite.cmake
Normal file
43
build_files/cmake/config/blender_lite.cmake
Normal file
|
@ -0,0 +1,43 @@
|
|||
# turn everything OFF CACHE FORCE BOOL) except for python which defaults to ON
|
||||
# and is needed for the UI
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_lite.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_INSTALL_PORTABLE ON CACHE FORCE BOOL)
|
||||
|
||||
set(WITH_BUILDINFO OFF CACHE FORCE BOOL)
|
||||
set(WITH_BUILTIN_GLEW OFF CACHE FORCE BOOL)
|
||||
set(WITH_BULLET OFF CACHE FORCE BOOL)
|
||||
set(WITH_CODEC_FFMPEG OFF CACHE FORCE BOOL)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE FORCE BOOL)
|
||||
set(WITH_FFTW3 OFF CACHE FORCE BOOL)
|
||||
set(WITH_GAMEENGINE OFF CACHE FORCE BOOL)
|
||||
set(WITH_IK_ITASC OFF CACHE FORCE BOOL)
|
||||
set(WITH_IMAGE_CINEON OFF CACHE FORCE BOOL)
|
||||
set(WITH_IMAGE_DDS OFF CACHE FORCE BOOL)
|
||||
set(WITH_IMAGE_FRAMESERVER OFF CACHE FORCE BOOL)
|
||||
set(WITH_IMAGE_HDR OFF CACHE FORCE BOOL)
|
||||
set(WITH_IMAGE_OPENEXR OFF CACHE FORCE BOOL)
|
||||
set(WITH_IMAGE_OPENJPEG OFF CACHE FORCE BOOL)
|
||||
set(WITH_IMAGE_REDCODE OFF CACHE FORCE BOOL)
|
||||
set(WITH_IMAGE_TIFF OFF CACHE FORCE BOOL)
|
||||
set(WITH_INPUT_NDOF OFF CACHE FORCE BOOL)
|
||||
set(WITH_INTERNATIONAL OFF CACHE FORCE BOOL)
|
||||
set(WITH_JACK OFF CACHE FORCE BOOL)
|
||||
set(WITH_LZMA OFF CACHE FORCE BOOL)
|
||||
set(WITH_LZO OFF CACHE FORCE BOOL)
|
||||
set(WITH_MOD_BOOLEAN OFF CACHE FORCE BOOL)
|
||||
set(WITH_MOD_DECIMATE OFF CACHE FORCE BOOL)
|
||||
set(WITH_MOD_FLUID OFF CACHE FORCE BOOL)
|
||||
set(WITH_MOD_SMOKE OFF CACHE FORCE BOOL)
|
||||
set(WITH_AUDASPACE OFF CACHE FORCE BOOL)
|
||||
set(WITH_OPENAL OFF CACHE FORCE BOOL)
|
||||
set(WITH_OPENCOLLADA OFF CACHE FORCE BOOL)
|
||||
set(WITH_OPENMP OFF CACHE FORCE BOOL)
|
||||
set(WITH_PYTHON_INSTALL OFF CACHE FORCE BOOL)
|
||||
set(WITH_RAYOPTIMIZATION OFF CACHE FORCE BOOL)
|
||||
set(WITH_SAMPLERATE OFF CACHE FORCE BOOL)
|
||||
set(WITH_SDL OFF CACHE FORCE BOOL)
|
||||
set(WITH_X11_XINPUT OFF CACHE FORCE BOOL)
|
34
build_files/cmake/config/bpy_module.cmake
Normal file
34
build_files/cmake/config/bpy_module.cmake
Normal file
|
@ -0,0 +1,34 @@
|
|||
# defaults for building blender as a python module 'bpy'
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/bpy_module.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_PYTHON_MODULE ON CACHE FORCE BOOL)
|
||||
|
||||
# install into the systems python dir
|
||||
set(WITH_INSTALL_PORTABLE OFF CACHE FORCE BOOL)
|
||||
|
||||
# no point int copying python into python
|
||||
set(WITH_PYTHON_INSTALL OFF CACHE FORCE BOOL)
|
||||
|
||||
# dont build the game engine
|
||||
set(WITH_GAMEENGINE OFF CACHE FORCE BOOL)
|
||||
|
||||
# disable audio, its possible some devs may want this but for now disable
|
||||
# so the python module doesnt hold the audio device and loads quickly.
|
||||
set(WITH_AUDASPACE OFF CACHE FORCE BOOL)
|
||||
set(WITH_SAMPLERATE OFF CACHE FORCE BOOL)
|
||||
set(WITH_FFTW3 OFF CACHE FORCE BOOL)
|
||||
set(WITH_JACK OFF CACHE FORCE BOOL)
|
||||
set(WITH_SDL OFF CACHE FORCE BOOL)
|
||||
set(WITH_OPENAL OFF CACHE FORCE BOOL)
|
||||
set(WITH_CODEC_FFMPEG OFF CACHE FORCE BOOL)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE FORCE BOOL)
|
||||
|
||||
# other features which are not especially useful as a python module
|
||||
set(WITH_X11_XINPUT OFF CACHE FORCE BOOL)
|
||||
set(WITH_INPUT_NDOF OFF CACHE FORCE BOOL)
|
||||
set(WITH_OPENCOLLADA OFF CACHE FORCE BOOL)
|
||||
set(WITH_INTERNATIONAL OFF CACHE FORCE BOOL)
|
||||
set(WITH_BULLET OFF CACHE FORCE BOOL)
|
Loading…
Reference in a new issue