diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-13 21:52:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-13 21:53:10 +0300 |
commit | 75a86d6a8e48c988294303a2390a0c7b86cca417 (patch) | |
tree | 6d4c613fa94c2f13126caa7418c9bf96d83b8f9f /source | |
parent | a1ac42f5ebbe965743182f5b0e0876dbeed00156 (diff) |
Fix for building without Python
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Expressions/CMakeLists.txt | 10 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 7 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_MouseActuator.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_MouseActuator.h | 5 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_MouseFocusSensor.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 11 |
6 files changed, 29 insertions, 10 deletions
diff --git a/source/gameengine/Expressions/CMakeLists.txt b/source/gameengine/Expressions/CMakeLists.txt index 48c10d75a17..f827a9528b4 100644 --- a/source/gameengine/Expressions/CMakeLists.txt +++ b/source/gameengine/Expressions/CMakeLists.txt @@ -55,7 +55,6 @@ set(SRC StringValue.cpp Value.cpp VectorValue.cpp - KX_PythonCallBack.cpp BoolValue.h ConstExpr.h @@ -78,7 +77,14 @@ set(SRC Value.h VectorValue.h VoidValue.h - KX_PythonCallBack.h ) +if(WITH_PYTHON) + list(APPEND SRC + KX_PythonCallBack.cpp + + KX_PythonCallBack.h + ) +endif() + blender_add_lib(ge_logic_expressions "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index e77960b99b1..34d50e24741 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -69,10 +69,13 @@ #include "BL_ActionManager.h" #include "BL_Action.h" -#include "KX_PythonCallBack.h" #include "PyObjectPlus.h" /* python stuff */ #include "BLI_utildefines.h" -#include "python_utildefines.h" + +#ifdef WITH_PYTHON +# include "KX_PythonCallBack.h" +# include "python_utildefines.h" +#endif // This file defines relationships between parents and children // in the game engine. diff --git a/source/gameengine/Ketsji/KX_MouseActuator.cpp b/source/gameengine/Ketsji/KX_MouseActuator.cpp index c372e6e9ce2..154ad1da3a1 100644 --- a/source/gameengine/Ketsji/KX_MouseActuator.cpp +++ b/source/gameengine/Ketsji/KX_MouseActuator.cpp @@ -337,7 +337,7 @@ void KX_MouseActuator::setMousePosition(float fx, float fy) m_canvas->SetMousePosition(x, y); } -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON /* ------------------------------------------------------------------------- */ /* Python functions */ @@ -536,4 +536,4 @@ PyObject* KX_MouseActuator::PyReset() Py_RETURN_NONE; } -#endif +#endif /* WITH_PYTHON */ diff --git a/source/gameengine/Ketsji/KX_MouseActuator.h b/source/gameengine/Ketsji/KX_MouseActuator.h index bf90bd21dac..e244e271428 100644 --- a/source/gameengine/Ketsji/KX_MouseActuator.h +++ b/source/gameengine/Ketsji/KX_MouseActuator.h @@ -104,6 +104,9 @@ public: virtual void getMousePosition(float*); virtual void setMousePosition(float, float); + +#ifdef WITH_PYTHON + /* --------------------------------------------------------------------- */ /* Python interface ---------------------------------------------------- */ /* --------------------------------------------------------------------- */ @@ -122,6 +125,8 @@ public: static PyObject* pyattr_get_angle(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_angle(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); +#endif /* WITH_PYTHON */ + }; #endif //__KX_MOUSEACTUATOR_DOC diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index c2c83266791..c3c693ed55f 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -36,6 +36,8 @@ # pragma warning(disable:4786) #endif +#include <stdio.h> + #include "MT_Point3.h" #include "RAS_FramingManager.h" #include "RAS_ICanvas.h" diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 25755f7127b..2adc20b0288 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -35,6 +35,8 @@ # pragma warning (disable:4786) #endif +#include <stdio.h> + #include "KX_Scene.h" #include "KX_PythonInit.h" #include "MT_assert.h" @@ -43,7 +45,6 @@ #include "KX_FontObject.h" #include "RAS_IPolygonMaterial.h" #include "ListValue.h" -#include "KX_PythonCallBack.h" #include "SCA_LogicManager.h" #include "SCA_TimeEventManager.h" //#include "SCA_AlwaysEventManager.h" @@ -95,12 +96,14 @@ #include "KX_ObstacleSimulation.h" #ifdef WITH_BULLET -#include "KX_SoftBodyDeformer.h" +# include "KX_SoftBodyDeformer.h" #endif -#include "KX_Light.h" +#ifdef WITH_PYTHON +# include "KX_PythonCallBack.h" +#endif -#include <stdio.h> +#include "KX_Light.h" #include "BLI_task.h" |