2.5 / SCons
authorNathan Letwory <nathan@letworyinteractive.com>
Sat, 27 Dec 2008 20:22:22 +0000 (20:22 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Sat, 27 Dec 2008 20:22:22 +0000 (20:22 +0000)
* make sure we can build WITH_BF_PYTHON=False

source/blender/windowmanager/SConscript
source/blender/windowmanager/intern/wm_init_exit.c

index c4a6cba90b2ef89898dbcd88bfaf603407c540cb..a160d13a64f2be908614a9988b9938a5b1fadb12 100644 (file)
@@ -13,4 +13,10 @@ incs += ' ../makesrna ../gpu'
 
 incs += ' #/intern/guardedalloc #/intern/memutil #/intern/ghost #/intern/bmfont'
 incs += ' #/intern/elbeem #/extern/glew/include'
-env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), [], libtype=['core'], priority=[5] )
+
+defs = []
+
+if not env['WITH_BF_PYTHON']:
+       defs.append('DISABLE_PYTHON')
+
+env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defs, libtype=['core'], priority=[5] )
index 274595cc2f177b7c72536fe50c4b36b910462eaf..0bf0a89fd7aa4910ffcb7d90f91e68003836c15f 100644 (file)
@@ -211,7 +211,9 @@ void WM_exit(bContext *C)
        
        /* before free_blender so py's gc happens while library still exists */
        /* needed at least for a rare sigsegv that can happen in pydrivers */
+#ifndef DISABLE_PYTHON
        BPY_end_python();
+#endif
        
 //     fastshade_free_render();        /* shaded view */
        free_blender();                         /* blender.c, does entire library */