cmake support for building without fluidsim
authorCampbell Barton <ideasman42@gmail.com>
Thu, 2 Jul 2009 22:22:35 +0000 (22:22 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 2 Jul 2009 22:22:35 +0000 (22:22 +0000)
source/blender/editors/CMakeLists.txt
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_fluidsim.c

index 914fdaa4bc6f2043d43c1aa10b965e2161bf5e34..b7a868ad537dfb13a6252df9e23539e61c754942 100644 (file)
@@ -64,6 +64,10 @@ IF(WITH_FFMPEG)
   ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
+IF(NOT WITH_ELBEEM)
+  ADD_DEFINITIONS(-DDISABLE_ELBEEM)
+ENDIF(NOT WITH_ELBEEM)
+
 IF(WITH_PYTHON)
   SET(INC ${INC} ${PYTHON_INC})
 ELSE(WITH_PYTHON)
index 963e4f9aeffbad4532ab67590710b8c881c6526b..3400b69ee3877ff813ca9727e0f32097b8b0a6ec 100644 (file)
@@ -62,6 +62,10 @@ IF(WITH_FFMPEG)
   ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
+IF(NOT WITH_ELBEEM)
+  ADD_DEFINITIONS(-DDISABLE_ELBEEM)
+ENDIF(NOT WITH_ELBEEM)
+
 # Build makesrna executable
 ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
 TARGET_LINK_LIBRARIES(makesrna bf_dna)
index 4316666700f0de5c78381c13c7a2d60989fb77b8..44a50fbae250bd7797770963bf9fb7dfe4c983d8 100644 (file)
@@ -130,10 +130,14 @@ static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
 
 static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *value)
 {
+#ifdef DISABLE_ELBEEM
+       value[0]= '\0';
+#else
        Object *ob= (Object*)ptr->id.data;
        FluidsimSettings *fss= (FluidsimSettings*)ptr->data;
 
        fluid_estimate_memory(ob, fss, value);
+#endif
 }
 
 static int rna_DomainFluidSettings_memory_estimate_length(PointerRNA *ptr)