Added WITH_PYTHON as a cmake option
authorCampbell Barton <ideasman42@gmail.com>
Wed, 31 Dec 2008 05:20:35 +0000 (05:20 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 31 Dec 2008 05:20:35 +0000 (05:20 +0000)
CMakeLists.txt
source/blender/CMakeLists.txt
source/blender/blenkernel/CMakeLists.txt
source/blender/editors/CMakeLists.txt
source/blender/editors/screen/CMakeLists.txt
source/blender/nodes/CMakeLists.txt
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/intern/wm_init_exit.c
source/creator/CMakeLists.txt

index 4d722d3..2616bff 100644 (file)
@@ -63,7 +63,7 @@ OPTION(WITH_QUICKTIME         "Enable Quicktime Support"                              OFF)
 OPTION(WITH_OPENEXR            "Enable OpenEXR Support (http://www.openexr.com)"       ON)
 OPTION(WITH_DDS                        "Enable DDS Support"                                    ON)
 OPTION(WITH_FFMPEG             "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)"   OFF)
-OPTION(WITH_FFMPEG             "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)"   OFF)
+OPTION(WITH_PYTHON             "Enable Embedded Python API"                            ON)
 OPTION(WITH_OPENAL             "Enable OpenAL Support (http://www.openal.org)"         ON)
 OPTION(WITH_OPENMP             "Enable OpenMP (has to be supported by the compiler)"   OFF)
 OPTION(WITH_WEBPLUGIN          "Enable Web Plugin (Unix only)"                         OFF)
index 47b04b1..47688b6 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SUBDIRS(windowmanager editors avi nodes blenkernel blenlib blenloader blenpluginapi imbuf imbuf/intern/cineon gpu makesdna makesrna python radiosity readblenfile render yafray)
+SUBDIRS(windowmanager editors avi nodes blenkernel blenlib blenloader blenpluginapi imbuf imbuf/intern/cineon gpu makesdna makesrna radiosity readblenfile render yafray)
 
 IF(WITH_INTERNATIONAL)
   SUBDIRS(ftfont)
@@ -41,3 +41,7 @@ ENDIF(WITH_DDS)
 IF(WITH_QUICKTIME)
   SUBDIRS(quicktime)
 ENDIF(WITH_QUICKTIME)
+
+IF(WITH_PYTHON)
+  SUBDIRS(python)
+ENDIF(WITH_PYTHON)
\ No newline at end of file
index 30d6252..0680827 100644 (file)
@@ -28,14 +28,13 @@ FILE(GLOB SRC intern/*.c)
 
 SET(INC 
   . ../../../intern/guardedalloc ../editors/include ../blenlib ../makesdna
-  ../python ../render/extern/include ../../../intern/decimation/extern
+  ../render/extern/include ../../../intern/decimation/extern
   ../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern
   ../../../intern/iksolver/extern ../blenloader ../quicktime
   ../../../intern/bmfont ../../../extern/bullet2/src
   ../nodes ../../../extern/glew/include ../gpu ../makesrna
   ${SDL_INC}
   ${ZLIB_INC}
-  ${PYTHON_INC}
 )
 
 IF(WITH_VERSE)
@@ -65,7 +64,11 @@ IF(WITH_PLAYER)
   SUBDIRS(bad_level_call_stubs)
 ENDIF(WITH_PLAYER)
 
-ADD_DEFINITIONS(-DWITH_CCGSUBSURF)
+IF(WITH_PYTHON)
+  SET(INC ${INC} ../python ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+  ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
 
 BLENDERLIB(bf_blenkernel "${SRC}" "${INC}")
 
index 22e1286..19a91d0 100644 (file)
@@ -38,7 +38,6 @@ SET(INC ../windowmanager
   ../../../intern/ghost ../../../intern/opennl/extern ../../../extern/glew/include
   ../nodes
   ../gpu
-  ${PYTHON_INC}
   ${SDL_INC}
 )
 
@@ -62,6 +61,12 @@ IF(WITH_FFMPEG)
   ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
+IF(WITH_PYTHON)
+  SET(INC ${INC} ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+  ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
 IF(WIN32)
   SET(INC ${INC} ${PTHREADS_INC})
 ENDIF(WIN32)
index da0475c..c6d1288 100644 (file)
@@ -36,12 +36,11 @@ SET(INC ../../windowmanager
   ../../include ../../../../intern/bmfont ../../imbuf 
   ../../render/extern/include ../../../../intern/bsp/extern 
   ../../radiosity/extern/include
-  ../../../intern/decimation/extern ../../blenloader ../../python
+  ../../../intern/decimation/extern ../../blenloader
   ../../../kernel/gen_system ../../../../intern/SoundSystem ../../readstreamglue
   ../../quicktime ../../../../intern/elbeem/extern
   ../../../../intern/ghost ../../../../intern/opennl/extern
   ../../nodes
-  ${PYTHON_INC}
   ${SDL_INC}
 )
 
@@ -65,6 +64,12 @@ IF(WITH_FFMPEG)
   ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
+IF(WITH_PYTHON)
+  SET(INC ${INC} ../../python ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+  ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
 IF(WIN32)
   SET(INC ${INC} ${PTHREADS_INC})
 ENDIF(WIN32)
index 7daf323..4f8f4f3 100644 (file)
@@ -27,13 +27,12 @@ FILE(GLOB SRC intern/*.c intern/CMP_nodes/*.c intern/SHD_nodes/*.c intern/TEX_no
 
 SET(INC 
   . ../../../intern/guardedalloc ../editors/include ../blenlib ../makesdna
-  ../python ../render/extern/include ../../../intern/decimation/extern
+  ../render/extern/include ../../../intern/decimation/extern
   ../imbuf ../avi ../../../intern/elbeem/extern
   ../../../intern/iksolver/extern ../blenloader ../quicktime
   ../blenkernel ../../../extern/glew/include ../gpu
   ${SDL_INC}
   ${ZLIB_INC}
-  ${PYTHON_INC}
 )
 
 IF(WITH_VERSE)
@@ -55,6 +54,12 @@ IF(WITH_FFMPEG)
   ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
+IF(WITH_PYTHON)
+  SET(INC ${INC} ../python ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+  ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
 ADD_DEFINITIONS(-DWITH_CCGSUBSURF)
 
 BLENDERLIB(bf_nodes "${SRC}" "${INC}")
index 8bbe328..10830d8 100644 (file)
@@ -32,13 +32,12 @@ SET(INC .
   ../blenlib ../makesdna ../makesrna ../blenkernel
   ../include ../../../intern/bmfont ../imbuf ../render/extern/include
   ../../../intern/bsp/extern ../radiosity/extern/include
-  ../../../intern/decimation/extern ../blenloader ../python
+  ../../../intern/decimation/extern ../blenloader
   ../../kernel/gen_system ../../../intern/SoundSystem ../readstreamglue
   ../quicktime ../../../intern/elbeem/extern
   ../../../intern/ghost ../../../intern/opennl/extern ../../../extern/glew/include
   ../nodes
   ../gpu
-  ${PYTHON_INC}
   ${SDL_INC}
 )
 
@@ -62,6 +61,12 @@ IF(WITH_FFMPEG)
   ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
+IF(WITH_PYTHON)
+  SET(INC ${INC} ../python ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+  ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
 IF(WIN32)
   SET(INC ${INC} ${PTHREADS_INC})
 ENDIF(WIN32)
index 500b04e..ee6c841 100644 (file)
@@ -65,7 +65,9 @@
 
 #include "radio.h"
 
+#ifndef DISABLE_PYTHON
 #include "BPY_extern.h"
+#endif
 
 #include "SYS_System.h"
 
index 63e1a32..5d26ccc 100644 (file)
@@ -38,7 +38,6 @@ INCLUDE_DIRECTORIES(../../intern/guardedalloc
   ../blender/imbuf
   ../blender/renderconverter
   ../blender/render/extern/include
-  ../blender/python
   ../blender/makesdna
   ../blender/gpu
   ../blender/windowmanager
@@ -57,6 +56,12 @@ IF(WITH_OPENEXR)
   ADD_DEFINITIONS(-DWITH_OPENEXR)
 ENDIF(WITH_OPENEXR)
 
+IF(WITH_PYTHON)
+  INCLUDE_DIRECTORIES(../blender/python)
+ELSE(WITH_PYTHON)
+  ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
 IF(LINUX)
   ADD_DEFINITIONS(-DWITH_BINRELOC)
   INCLUDE_DIRECTORIES(${BINRELOC_INC})