Fixed support for building without collada (scons and cmake). Only tested scons.
authorArystanbek Dyussenov <arystan.d@gmail.com>
Sun, 25 Oct 2009 07:51:40 +0000 (07:51 +0000)
committerArystanbek Dyussenov <arystan.d@gmail.com>
Sun, 25 Oct 2009 07:51:40 +0000 (07:51 +0000)
Re-enabled collada code building by default in cmake. Realized this should be off only in trunk.

CMakeLists.txt
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/SConscript
source/blender/windowmanager/intern/wm_operators.c

index c527d77f26e68990b305cff3f0a1f030ed25ad95..740161287422913bfab5bd96ad56b8e8fe92fefb 100644 (file)
@@ -80,7 +80,7 @@ OPTION(WITH_LZMA          "Enable best LZMA compression, used for pointcache" ON
 OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation" OFF)
 OPTION(WITH_BUILDINFO     "Include extra build details" ON)
 OPTION(WITH_INSTALL       "Install accompanying scripts and language files needed to run blender" ON)
-OPTION(WITH_OPENCOLLADA                "Enable OpenCollada Support (http://www.opencollada.org/)"      OFF)
+OPTION(WITH_OPENCOLLADA                "Enable OpenCollada Support (http://www.opencollada.org/)"      ON)
 
 IF (APPLE)
 OPTION(WITH_COCOA        "Use Cocoa framework instead of deprecated Carbon" ON)
index 7deac8a4aa0fb89b65ae683d04699238e2bc1cb4..ec489e5261a21c99eeada8fe586d8dd08cac7497 100644 (file)
@@ -50,6 +50,10 @@ IF(WITH_OPENEXR)
        ADD_DEFINITIONS(-DWITH_OPENEXR)
 ENDIF(WITH_OPENEXR)
 
+IF(WITH_OPENCOLLADA)
+       ADD_DEFINITIONS(-DWITH_COLLADA)
+ENDIF(WITH_OPENCOLLADA)
+
 IF(WITH_QUICKTIME)
        SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
        ADD_DEFINITIONS(-DWITH_QUICKTIME)
index 08a291871f1398f2b558c26b0c0662e8880df2e2..c01649485a575e6b57e1e4ecc82905f78da65b12 100644 (file)
@@ -19,6 +19,9 @@ defs = []
 if not env['WITH_BF_PYTHON']:
        defs.append('DISABLE_PYTHON')
 
+if env['WITH_BF_COLLADA']:
+       defs.append('WITH_COLLADA')
+
 if env['OURPLATFORM'] == 'linux2':
        cflags='-pthread'
        incs += ' ../../../extern/binreloc/include'
index b0fdbe2a4e14e75b6a3643d91897643bb8c9bd4b..376a98e208878a525ce0810778c9771125eac812 100644 (file)
@@ -1294,10 +1294,9 @@ static void WM_OT_save_mainfile(wmOperatorType *ot)
 }
 
 
+/* XXX: move these collada operators to a more appropriate place */
+#ifdef WITH_COLLADA
 
-
-
-/* XXX: move these to a more appropriate place */
 #include "../../collada/collada.h"
 
 static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *event)
@@ -1392,7 +1391,7 @@ static void WM_OT_collada_import(wmOperatorType *ot)
        RNA_def_property(ot->srna, "filename", PROP_STRING, PROP_FILEPATH);
 }
 
-
+#endif
 
 
 
@@ -2284,9 +2283,12 @@ void wm_operatortype_init(void)
        WM_operatortype_append(WM_OT_debug_menu);
        WM_operatortype_append(WM_OT_search_menu);
 
+#ifdef WITH_COLLADA
        /* XXX: move these */
        WM_operatortype_append(WM_OT_collada_export);
        WM_operatortype_append(WM_OT_collada_import);
+#endif
+
        WM_operatortype_append(WM_OT_call_menu);
 }