[Bf-blender-cvs] [75a86d6] master: Fix for building without Python

Campbell Barton noreply at git.blender.org
Sat Jun 13 20:57:33 CEST 2015


Commit: 75a86d6a8e48c988294303a2390a0c7b86cca417
Author: Campbell Barton
Date:   Sun Jun 14 04:52:52 2015 +1000
Branches: master
https://developer.blender.org/rB75a86d6a8e48c988294303a2390a0c7b86cca417

Fix for building without Python

===================================================================

M	source/gameengine/Expressions/CMakeLists.txt
M	source/gameengine/Ketsji/KX_GameObject.cpp
M	source/gameengine/Ketsji/KX_MouseActuator.cpp
M	source/gameengine/Ketsji/KX_MouseActuator.h
M	source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
M	source/gameengine/Ketsji/KX_Scene.cpp

===================================================================

diff --git a/source/gameengine/Expressions/CMakeLists.txt b/source/gameengine/Expressions/CMakeLists.txt
index 48c10d7..f827a95 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 e77960b..34d50e2 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 c372e6e..154ad1d 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 bf90bd2..e244e27 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 c2c8326..c3c693e 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 25755f7..2adc20b 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"




More information about the Bf-blender-cvs mailing list