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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-29 10:56:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-29 10:56:45 +0300
commit1dd1cea06e0bb1c9cd1e08fd9f359893dc2681a3 (patch)
treecad3a7d94daf0b17742bf707d159e6ca867b5cc5 /source
parent04d374194756516c8b7a15fff99bfa72a2239f75 (diff)
fix for error when changing DISBALE_PYTHON -> WITH_PYTHON,
This define wasn't set in some parts of the BGE causing problems with the view matrix. in CMake define for the entire BGE fixes this.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/mesh/editface.c6
-rw-r--r--source/blender/editors/util/undo.c5
-rw-r--r--source/blender/python/intern/bpy.c1
-rw-r--r--source/gameengine/BlenderRoutines/CMakeLists.txt5
-rw-r--r--source/gameengine/CMakeLists.txt6
-rw-r--r--source/gameengine/Converter/CMakeLists.txt5
-rw-r--r--source/gameengine/Expressions/CMakeLists.txt5
-rw-r--r--source/gameengine/GameLogic/CMakeLists.txt5
-rw-r--r--source/gameengine/GamePlayer/common/CMakeLists.txt5
-rw-r--r--source/gameengine/GamePlayer/ghost/CMakeLists.txt5
-rw-r--r--source/gameengine/Ketsji/CMakeLists.txt5
-rw-r--r--source/gameengine/Ketsji/KXNetwork/CMakeLists.txt5
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript4
-rw-r--r--source/gameengine/SceneGraph/SConscript4
-rw-r--r--source/gameengine/VideoTexture/CMakeLists.txt5
15 files changed, 18 insertions, 53 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index b34f024e9fb..95f14c03fd0 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -51,12 +51,6 @@
#include "BIF_gl.h"
-
-#ifdef WITH_PYTHON
-//#include "BPY_extern.h"
-//#include "BPY_menus.h"
-#endif
-
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_view3d.h"
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index e8c4edf3d57..f0e8184b991 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -156,9 +156,10 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
if(do_glob_undo) {
if(U.uiflag & USER_GLOBALUNDO) {
-#ifdef WITH_PYTHON
+ // note python defines not valid here anymore.
+ //#ifdef WITH_PYTHON
// XXX BPY_scripts_clear_pyobjects();
-#endif
+ //#endif
if(undoname)
BKE_undo_name(C, undoname);
else
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index cb9c791f6f1..584ba235e30 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -25,6 +25,7 @@
/* This file defines the '_bpy' module which is used by python's 'bpy' package.
* a script writer should never directly access this module */
+#define WITH_PYTHON /* for AUD_PyInit.h, possibly others */
#include "bpy_util.h"
#include "bpy_rna.h"
diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt
index 68d86a94ce3..ae46d8bf5b0 100644
--- a/source/gameengine/BlenderRoutines/CMakeLists.txt
+++ b/source/gameengine/BlenderRoutines/CMakeLists.txt
@@ -57,9 +57,4 @@ IF(WITH_FFMPEG)
ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
-IF(WITH_PYTHON)
- LIST(APPEND INC ${PYTHON_INC})
- ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
BLENDERLIB(ge_blen_routines "${SRC}" "${INC}")
diff --git a/source/gameengine/CMakeLists.txt b/source/gameengine/CMakeLists.txt
index eea600cb0cb..7f8abfec8c5 100644
--- a/source/gameengine/CMakeLists.txt
+++ b/source/gameengine/CMakeLists.txt
@@ -24,6 +24,12 @@
#
# ***** END GPL LICENSE BLOCK *****
+# there are too many inter-includes so best define here
+IF(WITH_PYTHON)
+ INCLUDE_DIRECTORIES(${PYTHON_INC})
+ ADD_DEFINITIONS(-DWITH_PYTHON)
+ENDIF(WITH_PYTHON)
+
ADD_SUBDIRECTORY(BlenderRoutines)
ADD_SUBDIRECTORY(Converter)
ADD_SUBDIRECTORY(Expressions)
diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt
index 7b05d1b8fd6..a930fcb0c01 100644
--- a/source/gameengine/Converter/CMakeLists.txt
+++ b/source/gameengine/Converter/CMakeLists.txt
@@ -105,11 +105,6 @@ SET(SRC
KX_SoftBodyDeformer.h
)
-IF(WITH_PYTHON)
- LIST(APPEND INC ${PYTHON_INC})
- ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
IF(WITH_BULLET)
ADD_DEFINITIONS(-DUSE_BULLET)
ENDIF(WITH_BULLET)
diff --git a/source/gameengine/Expressions/CMakeLists.txt b/source/gameengine/Expressions/CMakeLists.txt
index bafab06f78f..1197927bb87 100644
--- a/source/gameengine/Expressions/CMakeLists.txt
+++ b/source/gameengine/Expressions/CMakeLists.txt
@@ -78,9 +78,4 @@ SET(SRC
VoidValue.h
)
-IF(WITH_PYTHON)
- LIST(APPEND INC ${PYTHON_INC})
- ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
BLENDERLIB(ge_logic_expressions "${SRC}" "${INC}")
diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt
index ccf6741626c..e8de2ebd53c 100644
--- a/source/gameengine/GameLogic/CMakeLists.txt
+++ b/source/gameengine/GameLogic/CMakeLists.txt
@@ -129,9 +129,4 @@ ELSE(WITH_SDL)
ADD_DEFINITIONS(-DDISABLE_SDL)
ENDIF(WITH_SDL)
-IF(WITH_PYTHON)
- LIST(APPEND INC ${PYTHON_INC})
- ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
BLENDERLIB(ge_logic "${SRC}" "${INC}")
diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt
index 45d760d4efb..46fd467e8d5 100644
--- a/source/gameengine/GamePlayer/common/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/common/CMakeLists.txt
@@ -88,11 +88,6 @@ SET(SRC
windows/GPW_System.h
)
-IF(WITH_PYTHON)
- LIST(APPEND INC ${PYTHON_INC})
- ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
ADD_DEFINITIONS(-DGLEW_STATIC)
BLENDERLIB_NOLIST(ge_player_common "${SRC}" "${INC}")
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
index fe8c787c937..01e0cb45cd4 100644
--- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
@@ -76,9 +76,4 @@ IF(WITH_FFMPEG)
ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
-IF(WITH_PYTHON)
- LIST(APPEND INC ${PYTHON_INC})
- ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
BLENDERLIB_NOLIST(ge_player_ghost "${SRC}" "${INC}")
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index 8ca6b98217f..25388171cac 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -208,11 +208,6 @@ ELSE(WITH_SDL)
ADD_DEFINITIONS(-DDISABLE_SDL)
ENDIF(WITH_SDL)
-IF(WITH_PYTHON)
- LIST(APPEND INC ${PYTHON_INC})
- ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
IF(WITH_FFMPEG)
ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
diff --git a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
index 538f2b8e60b..687f19b9022 100644
--- a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
+++ b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
@@ -50,9 +50,4 @@ SET(SRC
KX_NetworkObjectSensor.h
)
-IF(WITH_PYTHON)
- LIST(APPEND INC ${PYTHON_INC})
- ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
BLENDERLIB(ge_logic_network "${SRC}" "${INC}")
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
index 791478cae38..890d1efb850 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
@@ -13,4 +13,8 @@ incs += ' #intern/guardedalloc #source/blender/blenlib'
if env['WITH_BF_CXX_GUARDEDALLOC']:
defs.append('WITH_CXX_GUARDEDALLOC')
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+ defs.append('WITH_PYTHON')
+
env.BlenderLib ( 'ge_oglrasterizer', Split(sources), Split(incs), defines = defs, libtype=['core','player'], priority=[350,75], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/SceneGraph/SConscript b/source/gameengine/SceneGraph/SConscript
index b4738bd20b4..9270169199e 100644
--- a/source/gameengine/SceneGraph/SConscript
+++ b/source/gameengine/SceneGraph/SConscript
@@ -12,4 +12,8 @@ if env['WITH_BF_CXX_GUARDEDALLOC']:
defs.append('WITH_CXX_GUARDEDALLOC')
incs += ' #intern/guardedalloc'
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+ defs.append('WITH_PYTHON')
+
env.BlenderLib ( 'ge_scenegraph', sources, Split(incs), defs, libtype=['core','player'], priority=[325,85], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/VideoTexture/CMakeLists.txt b/source/gameengine/VideoTexture/CMakeLists.txt
index e483d6c812b..8e5c892f007 100644
--- a/source/gameengine/VideoTexture/CMakeLists.txt
+++ b/source/gameengine/VideoTexture/CMakeLists.txt
@@ -91,9 +91,4 @@ IF(WITH_FFMPEG)
ADD_DEFINITIONS(-D__STDC_CONSTANT_MACROS)
ENDIF(WITH_FFMPEG)
-IF(WITH_PYTHON)
- LIST(APPEND INC ${PYTHON_INC})
- ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
BLENDERLIB(ge_videotex "${SRC}" "${INC}")