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>2013-11-25 08:33:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-11-25 08:36:19 +0400
commit2b4c68b902b261127f7deabf922048c41be6fb55 (patch)
tree1c40311a6c8e13ea4754fc692283b11cafdb8bea /source/blender/editors
parent295116ea6b3a81a6c7b84d8a9d21288108c5f19e (diff)
CMake Build: option to compile without opennl/superlu.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/armature/CMakeLists.txt8
-rw-r--r--source/blender/editors/armature/armature_skinning.c6
-rw-r--r--source/blender/editors/armature/meshlaplacian.c15
-rw-r--r--source/blender/editors/uvedit/CMakeLists.txt8
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c39
5 files changed, 69 insertions, 7 deletions
diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt
index 1a0841f5342..ca2dc1b66e2 100644
--- a/source/blender/editors/armature/CMakeLists.txt
+++ b/source/blender/editors/armature/CMakeLists.txt
@@ -27,7 +27,6 @@ set(INC
../../makesrna
../../windowmanager
../../../../intern/guardedalloc
- ../../../../intern/opennl/extern
)
set(INC_SYS
@@ -67,4 +66,11 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
+if(WITH_OPENNL)
+ add_definitions(-DWITH_OPENNL)
+ list(APPEND INC_SYS
+ ../../../../intern/opennl/extern
+ )
+endif()
+
blender_add_lib(bf_editor_armature "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index 5f15d15d478..7ec0acf12d1 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -386,9 +386,13 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
/* compute the weights based on gathered vertices and bones */
if (heat) {
const char *error = NULL;
+
+#ifdef WITH_OPENNL
heat_bone_weighting(ob, mesh, verts, numbones, dgrouplist, dgroupflip,
root, tip, selected, &error);
-
+#else
+ error = "Built without OpenNL";
+#endif
if (error) {
BKE_report(reports, RPT_WARNING, error);
}
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 16d7f9c9420..3b285e12331 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -46,13 +46,14 @@
#include "BLI_polardecomp.h"
#endif
-#include "ONL_opennl.h"
-
#include "ED_mesh.h"
#include "ED_armature.h"
#include "meshlaplacian.h"
+#ifdef WITH_OPENNL
+
+#include "ONL_opennl.h"
/* ************* XXX *************** */
static void waitcursor(int UNUSED(val)) {}
@@ -2006,3 +2007,13 @@ void mesh_deform_bind(Scene *scene, MeshDeformModifierData *mmd, float *vertexco
waitcursor(0);
}
+#else /* WITH_OPENNL */
+
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
+void mesh_deform_bind(Scene *scene, MeshDeformModifierData *mmd, float *vertexcos, int totvert, float cagemat[4][4]) {}
+void *modifier_mdef_compact_influences_link_kludge = modifier_mdef_compact_influences;
+
+#endif /* WITH_OPENNL */
diff --git a/source/blender/editors/uvedit/CMakeLists.txt b/source/blender/editors/uvedit/CMakeLists.txt
index 62d4b01cab7..45edbde7482 100644
--- a/source/blender/editors/uvedit/CMakeLists.txt
+++ b/source/blender/editors/uvedit/CMakeLists.txt
@@ -28,7 +28,6 @@ set(INC
../../makesrna
../../windowmanager
../../../../intern/guardedalloc
- ../../../../intern/opennl/extern
)
set(INC_SYS
@@ -51,4 +50,11 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
+if(WITH_OPENNL)
+ add_definitions(-DWITH_OPENNL)
+ list(APPEND INC_SYS
+ ../../../../intern/opennl/extern
+ )
+endif()
+
blender_add_lib(bf_editor_uvedit "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 2d33a2d3937..e5c3510db4b 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -35,8 +35,6 @@
#include "BLI_boxpack2d.h"
#include "BLI_convexhull2d.h"
-#include "ONL_opennl.h"
-
#include "uvedit_intern.h"
#include "uvedit_parametrizer.h"
@@ -47,6 +45,10 @@
#include "BLI_sys_types.h" /* for intptr_t support */
+#ifdef WITH_OPENNL
+
+#include "ONL_opennl.h"
+
/* Utils */
#if 0
@@ -4715,3 +4717,36 @@ void param_flush_restore(ParamHandle *handle)
}
}
+#else /* WITH_OPENNL */
+
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
+/* stubs */
+void param_face_add(ParamHandle *handle, ParamKey key, int nverts,
+ ParamKey *vkeys, float **co, float **uv,
+ ParamBool *pin, ParamBool *select, float normal[3]) {}
+void param_edge_set_seam(ParamHandle *handle,
+ ParamKey *vkeys) {}
+void param_aspect_ratio(ParamHandle *handle, float aspx, float aspy) {}
+ParamHandle *param_construct_begin(void) { return NULL; }
+void param_construct_end(ParamHandle *handle, ParamBool fill, ParamBool impl) {}
+void param_delete(ParamHandle *handle) {}
+
+void param_stretch_begin(ParamHandle *handle) {}
+void param_stretch_blend(ParamHandle *handle, float blend) {}
+void param_stretch_iter(ParamHandle *handle) {}
+void param_stretch_end(ParamHandle *handle) {}
+
+void param_pack(ParamHandle *handle, float margin, bool do_rotate) {}
+void param_average(ParamHandle *handle) {}
+
+void param_flush(ParamHandle *handle) {}
+void param_flush_restore(ParamHandle *handle) {}
+
+void param_lscm_begin(ParamHandle *handle, ParamBool live, ParamBool abf) {}
+void param_lscm_solve(ParamHandle *handle) {}
+void param_lscm_end(ParamHandle *handle) {}
+
+#endif /* WITH_OPENNL */