Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-02-21 02:39:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-21 02:39:29 +0300
commitc30149991c9417106577e2d96112b16433910215 (patch)
tree9b686c141ddf2c9346ebe0beb3b3cfc3aaacf73f /CMakeLists.txt
parent55a0e21a03e88e5489dd6f53a91b6f3a6f770d9a (diff)
Experimental option to build blender as a python module, rather then blender embedding python.
CMake build option WITH_PYTHON_MODULE, will build ./bin/bpy.so This allows 'bpy' to be imported from python or other applications/IDE's which embed python, eg: python -c "import bpy ; bpy.ops.render.render(write_still=True)" This runs in background mode and has similar restrictions to running a script: blender --background --python test.py TODO: - install to site-packages with blender scripts - add support for imp.reload()
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 440170e332c..3952e48c802 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,6 +69,7 @@ get_blender_version()
# Blender internal features
option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
option(WITH_PYTHON "Enable Embedded Python API" ON)
+option(WITH_PYTHON_MODULE "Enable building as a python module (experemental)" OFF)
option(WITH_BUILDINFO "Include extra build details" ON)
option(WITH_IK_ITASC "Enable ITASC IK solver" ON)
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effects)" OFF)
@@ -1038,6 +1039,9 @@ endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
+#-------------------------------------------------------------------------------
+# Global Defines
+
# better not define flags here but this is a debugging option thats off by default.
if(WITH_CXX_GUARDEDALLOC)
set(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")