Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-23 19:40:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-23 19:40:13 +0400
commit05b297c52f025b8d2068b742d944ecd92c402256 (patch)
treeedf35c513fbc0710673d447c02501f624475f62a /source/blender
parentf383e2e0e681bd860044b0b4de1a12bf4de3c0e0 (diff)
CMake options to disable Decimate and Boolean Modifiers: WITH_MOD_BOOLEAN, WITH_MOD_DECIMATE, renamed WITH_FLUID to WITH_MOD_FLUID
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/CMakeLists.txt4
-rw-r--r--source/blender/editors/physics/CMakeLists.txt4
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt4
-rw-r--r--source/blender/modifiers/CMakeLists.txt21
-rw-r--r--source/blender/modifiers/Makefile2
-rw-r--r--source/blender/modifiers/SConscript4
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.c11
-rw-r--r--source/blender/modifiers/intern/MOD_decimate.c14
8 files changed, 47 insertions, 17 deletions
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index a63f0031eed..5252003c5b3 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -196,9 +196,9 @@ IF(WITH_OPENMP)
ADD_DEFINITIONS(-DPARALLEL=1)
ENDIF(WITH_OPENMP)
-IF(NOT WITH_FLUID)
+IF(NOT WITH_MOD_FLUID)
ADD_DEFINITIONS(-DDISABLE_ELBEEM)
-ENDIF(NOT WITH_FLUID)
+ENDIF(NOT WITH_MOD_FLUID)
IF(WITH_JACK)
ADD_DEFINITIONS(-DWITH_JACK)
diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt
index 5d36038b76a..481f6d8df44 100644
--- a/source/blender/editors/physics/CMakeLists.txt
+++ b/source/blender/editors/physics/CMakeLists.txt
@@ -43,9 +43,9 @@ IF(WIN32)
LIST(APPEND INC ${PTHREADS_INC})
ENDIF(WIN32)
-IF(NOT WITH_FLUID)
+IF(NOT WITH_MOD_FLUID)
ADD_DEFINITIONS(-DDISABLE_ELBEEM)
-ENDIF(NOT WITH_FLUID)
+ENDIF(NOT WITH_MOD_FLUID)
IF(WITH_OPENMP)
ADD_DEFINITIONS(-DPARALLEL=1)
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index a48603e623c..97e16bba057 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -112,9 +112,9 @@ IF(WITH_LCMS)
ADD_DEFINITIONS(-DWITH_LCMS)
ENDIF(WITH_LCMS)
-IF(NOT WITH_FLUID)
+IF(NOT WITH_MOD_FLUID)
ADD_DEFINITIONS(-DDISABLE_ELBEEM)
-ENDIF(NOT WITH_FLUID)
+ENDIF(NOT WITH_MOD_FLUID)
IF(WITH_FFTW3)
ADD_DEFINITIONS(-DFFTW3=1)
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index 99e8c05b1ae..40f0ad127cd 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -31,10 +31,8 @@ SET(INC
../blenkernel
../blenkernel/intern
../render/extern/include
- ../../../intern/guardedalloc
- ../../../intern/decimation/extern
+ ../../../intern/guardedalloc
../../../intern/elbeem/extern
- ../../../intern/bsp/extern
${ZLIB_INC}
)
@@ -43,7 +41,6 @@ SET(SRC
intern/MOD_array.c
intern/MOD_bevel.c
intern/MOD_boolean.c
- intern/MOD_boolean_util.c
intern/MOD_build.c
intern/MOD_cast.c
intern/MOD_cloth.c
@@ -79,9 +76,19 @@ SET(SRC
intern/MOD_wave.c
)
-IF(NOT WITH_FLUID)
+IF(WITH_MOD_BOOLEAN)
+ ADD_DEFINITIONS(-DWITH_MOD_BOOLEAN)
+ LIST(APPEND SRC intern/MOD_boolean_util.c)
+ LIST(APPEND INC ../../../intern/bsp/extern)
+ENDIF(WITH_MOD_BOOLEAN)
+
+IF(WITH_MOD_DECIMATE)
+ ADD_DEFINITIONS(-DWITH_MOD_DECIMATE)
+ LIST(APPEND INC ../../../intern/decimation/extern)
+ENDIF(WITH_MOD_BOOLEAN)
+
+IF(NOT WITH_MOD_FLUID)
ADD_DEFINITIONS(-DDISABLE_ELBEEM)
-ENDIF(NOT WITH_FLUID)
+ENDIF(NOT WITH_MOD_FLUID)
BLENDERLIB(bf_modifiers "${SRC}" "${INC}")
-
diff --git a/source/blender/modifiers/Makefile b/source/blender/modifiers/Makefile
index ddcddb90186..2115e8ac888 100644
--- a/source/blender/modifiers/Makefile
+++ b/source/blender/modifiers/Makefile
@@ -30,5 +30,5 @@
SOURCEDIR = source/blender/modifiers
DIRS = intern
-
+CFLAGS += -DWITH_MOD_BOOLEAN -DWITH_MOD_BOOLEAN
include nan_subdirs.mk
diff --git a/source/blender/modifiers/SConscript b/source/blender/modifiers/SConscript
index 7aa198f51f0..8d420fcb3b7 100644
--- a/source/blender/modifiers/SConscript
+++ b/source/blender/modifiers/SConscript
@@ -12,6 +12,10 @@ incs += ' ' + env['BF_ZLIB_INC']
defs = []
+# could be made optional
+defs += ['WITH_MOD_BOOLEAN']
+defs += ['WITH_MOD_DECIMATE']
+
if env['BF_NO_ELBEEM']:
defs.append('DISABLE_ELBEEM')
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index b2f7c685248..07300065659 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -82,7 +82,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
}
-
+#ifdef WITH_MOD_BOOLEAN
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
DerivedMesh *derivedData,
int UNUSED(useRenderParams),
@@ -107,6 +107,15 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
return derivedData;
}
+#else // WITH_MOD_BOOLEAN
+static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob),
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
+{
+ return derivedData;
+}
+#endif // WITH_MOD_BOOLEAN
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md))
{
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index 8df0c0be3eb..d7e0ff4702b 100644
--- a/source/blender/modifiers/intern/MOD_decimate.c
+++ b/source/blender/modifiers/intern/MOD_decimate.c
@@ -42,8 +42,9 @@
#include "MEM_guardedalloc.h"
+#ifdef WITH_MOD_DECIMATE
#include "LOD_decimation.h"
-
+#endif
static void initData(ModifierData *md)
{
@@ -60,6 +61,7 @@ static void copyData(ModifierData *md, ModifierData *target)
tdmd->percent = dmd->percent;
}
+#ifdef WITH_MOD_DECIMATE
static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
DerivedMesh *derivedData,
int UNUSED(useRenderParams),
@@ -176,7 +178,15 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
exit:
return result;
}
-
+#else // WITH_MOD_DECIMATE
+static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob),
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
+{
+ return derivedData;
+}
+#endif // WITH_MOD_DECIMATE
ModifierTypeInfo modifierType_Decimate = {
/* name */ "Decimate",