dont build blender/kernel if the game engines disabled.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 31 Oct 2010 00:56:46 +0000 (00:56 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 31 Oct 2010 00:56:46 +0000 (00:56 +0000)
source/CMakeLists.txt
source/SConscript
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/intern/wm_init_exit.c
source/creator/CMakeLists.txt
source/creator/creator.c

index 1f1b1d883bc7da3c644bc6e60f5568d7a02c5d66..a043dbad3b83ed1ebcd409eeb6aab2f57b961714 100644 (file)
@@ -25,9 +25,9 @@
 # ***** END GPL LICENSE BLOCK *****
 
 ADD_SUBDIRECTORY(blender)
-ADD_SUBDIRECTORY(kernel)
 
 IF(WITH_GAMEENGINE)
+       ADD_SUBDIRECTORY(kernel)
        ADD_SUBDIRECTORY(gameengine)
 ENDIF(WITH_GAMEENGINE)
        
index c452f21b8e24efce2a062aa64fb0461407a30075..8d08d9cca0838a1beb04eb2cb8a360440da3fd6e 100644 (file)
@@ -1,11 +1,10 @@
 #!/usr/bin/python
 Import ('env')
 
-SConscript(['blender/SConscript',
-            'kernel/SConscript',
-            'creator/SConscript'])
+SConscript(['blender/SConscript', 'creator/SConscript'])
+
 if env['WITH_BF_GAMEENGINE']:
-    SConscript (['gameengine/SConscript'])
+    SConscript (['kernel/SConscript', 'gameengine/SConscript'])
 
 if env['WITH_BF_PLAYER']:
     SConscript (['blenderplayer/bad_level_call_stubs/SConscript'])
index c39897af68aa029f9033784db750941f41793fe5..efdcd47ea720af02319c7a809cdd229d819a0029 100644 (file)
@@ -90,6 +90,10 @@ ELSE(WITH_PYTHON)
        ADD_DEFINITIONS(-DDISABLE_PYTHON)
 ENDIF(WITH_PYTHON)
 
+IF(WITH_GAMEENGINE)
+       ADD_DEFINITIONS(-DGAMEBLENDER)
+ENDIF(WITH_GAMEENGINE)
+
 IF(WIN32)
        LIST(APPEND INC ${PTHREADS_INC})
 ENDIF(WIN32)
index e373579577ded4d5a4c7f8049f40f44ee20af6c6..b9736009d32df4d2db87cf21b2742c0f75031511 100644 (file)
@@ -65,7 +65,9 @@
 #include "BPY_extern.h"
 #endif
 
+#if GAMEBLENDER == 1
 #include "SYS_System.h"
+#endif
 
 #include "RNA_define.h"
 
@@ -432,9 +434,9 @@ void WM_exit(bContext *C)
        wm_ghost_exit();
 
        CTX_free(C);
-       
+#if GAMEBLENDER == 1
        SYS_DeleteSystem(SYS_GetSystem());
-
+#endif
        if(MEM_get_memory_blocks_in_use()!=0) {
                printf("Error Totblock: %d\n", MEM_get_memory_blocks_in_use());
                MEM_printmemlist();
index 6d43e13718f83c520eba9967beaea8e0602e9aba..c32329e20ffda4cee9fad1ca300c5b3d47299fda 100644 (file)
@@ -78,6 +78,10 @@ ELSE(WITH_PYTHON)
        ADD_DEFINITIONS(-DDISABLE_PYTHON)
 ENDIF(WITH_PYTHON)
 
+IF(WITH_GAMEENGINE)
+       ADD_DEFINITIONS(-DGAMEBLENDER)
+ENDIF(WITH_GAMEENGINE)
+
 IF(NOT WITH_SDL)
        ADD_DEFINITIONS(-DDISABLE_SDL)
 ENDIF(NOT WITH_SDL)
index 25f01ea0beacd92e9ae7e70935e5e110b3e94aea..7e53ad5d64853df684673857c5c0c668b2371f99 100644 (file)
 #include "GPU_extensions.h"
 
 /* for passing information between creator and gameengine */
+#if GAMEBLENDER == 1
 #include "SYS_System.h"
+#else /* dummy */
+#define SYS_SystemHandle int
+#endif
 
 #include <signal.h>
 
@@ -444,6 +448,9 @@ static int register_extension(int UNUSED(argc), char **UNUSED(argv), void *data)
 
 static int no_joystick(int UNUSED(argc), char **UNUSED(argv), void *data)
 {
+#if GAMEBLENDER != 1
+       (void)data;
+#else
        SYS_SystemHandle *syshandle = data;
 
        /**
@@ -452,6 +459,7 @@ static int no_joystick(int UNUSED(argc), char **UNUSED(argv), void *data)
        */
        SYS_WriteCommandLineInt(*syshandle, "nojoystick",1);
        if (G.f & G_DEBUG) printf("disabling nojoystick\n");
+#endif
 
        return 0;
 }
@@ -633,8 +641,13 @@ static int set_extension(int argc, char **argv, void *data)
 
 static int set_ge_parameters(int argc, char **argv, void *data)
 {
-       SYS_SystemHandle syshandle = *(SYS_SystemHandle*)data;
        int a = 0;
+#if GAMEBLENDER == 1
+       SYS_SystemHandle syshandle = *(SYS_SystemHandle*)data;
+#else
+       (void)data;
+#endif
+
 /**
 gameengine parameters are automaticly put into system
 -g [paramname = value]
@@ -655,7 +668,9 @@ example:
                        {
                                a++;
                                /* assignment */
+#if GAMEBLENDER == 1
                                SYS_WriteCommandLineString(syshandle,paramname,argv[a]);
+#endif
                        }  else
                        {
                                printf("error: argument assignment (%s) without value.\n",paramname);
@@ -664,8 +679,9 @@ example:
                        /* name arg eaten */
 
                } else {
+#if GAMEBLENDER == 1
                        SYS_WriteCommandLineInt(syshandle,argv[a],1);
-
+#endif
                        /* doMipMap */
                        if (!strcmp(argv[a],"nomipmap"))
                        {
@@ -1077,8 +1093,12 @@ int main(int argc, char **argv)
 
        IMB_init();
 
+#if GAMEBLENDER == 1
        syshandle = SYS_GetSystem();
        GEN_init_messaging_system();
+#else
+       syshandle= 0;
+#endif
 
        /* first test for background */
        ba = BLI_argsInit(argc, argv); /* skip binary path */