B
authorChris Want <cwant@ualberta.ca>
Mon, 15 Dec 2008 20:53:45 +0000 (20:53 +0000)
committerChris Want <cwant@ualberta.ca>
Mon, 15 Dec 2008 20:53:45 +0000 (20:53 +0000)
Linking of blenderplayer was failing with unresolved symbols
(initVideoTexture) when building without FFMPEG. Needs
testing with SCons and Makefiles.

source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/Makefile
source/gameengine/GamePlayer/ghost/SConscript

index 5e0ca93..a3cd829 100644 (file)
@@ -70,5 +70,9 @@ SET(INC
   ${PYTHON_INC}
 )
 
+IF(WITH_FFMPEG)
+  ADD_DEFINITIONS(-DWITH_FFMPEG)
+ENDIF(WITH_FFMPEG)
+
 BLENDERLIB_NOLIST(gp_ghost "${SRC}" "${INC}")
 #env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = [], libtype='player',priority=0, compileflags=cflags)
index aa5e583..d0a2d0b 100644 (file)
@@ -686,8 +686,9 @@ bool GPG_Application::startEngine(void)
                initGameKeys();
                initPythonConstraintBinding();
                initMathutils();
+#ifdef WITH_FFMPEG
         initVideoTexture();
-
+#endif
                // Set the GameLogic.globalDict from marshal'd data, so we can
                // load new blend files and keep data in GameLogic.globalDict
                loadGamePythonConfig(m_pyGlobalDictString, m_pyGlobalDictString_Length);
index 52e219d..5f90d80 100644 (file)
@@ -82,3 +82,6 @@ CPPFLAGS += -I$(NAN_STRING)/include
 CPPFLAGS += -I$(NAN_GHOST)/include
 CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
 
+ifeq ($(WITH_FFMPEG), true)
+   CPPFLAGS += -DWITH_FFMPEG
+endif
index 33cf07b..c1559f6 100644 (file)
@@ -49,5 +49,7 @@ cflags = []
 if env['OURPLATFORM']=='win32-vc':
     cflags = ['/GR']
 
+if env['WITH_BF_FFMPEG']:
+    defs += ' WITH_FFMPEG'
 
 env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = [], libtype='player',priority=0, compileflags=cflags)