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>2012-08-18 17:36:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-18 17:36:29 +0400
commit47e313ec0cb367e3fcd8fa7aa8adeeb8a4580f13 (patch)
treeab51bfc11de85f335db533f40c5112c07e5edd12
parent9e742ffc2b4b99b076cfb66ba491a9fbfc5825c2 (diff)
cmake option to build without iksolver
-rw-r--r--CMakeLists.txt1
-rw-r--r--intern/CMakeLists.txt5
-rw-r--r--intern/iksolver/CMakeLists.txt2
-rw-r--r--intern/iksolver/SConscript2
-rw-r--r--source/blender/ikplugin/CMakeLists.txt17
-rw-r--r--source/blender/ikplugin/intern/ikplugin_api.c16
-rw-r--r--source/blenderplayer/CMakeLists.txt2
-rw-r--r--source/creator/CMakeLists.txt5
8 files changed, 35 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94eea7bd6aa..fd473889909 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,6 +126,7 @@ option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid d
option(WITH_PYTHON_MODULE "Enable building as a python module which runs without a user interface, like running regular blender in background mode (experimental, only enable for development)" OFF)
option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ON)
option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
+option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON)
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effects)" OFF)
option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
option(WITH_GAMEENGINE "Enable Game Engine" ON)
diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt
index 2b4a84d6b39..d520ffc87b4 100644
--- a/intern/CMakeLists.txt
+++ b/intern/CMakeLists.txt
@@ -28,7 +28,6 @@ add_subdirectory(ghost)
add_subdirectory(guardedalloc)
add_subdirectory(moto)
add_subdirectory(memutil)
-add_subdirectory(iksolver)
add_subdirectory(opennl)
add_subdirectory(mikktspace)
add_subdirectory(raskter)
@@ -58,6 +57,10 @@ if(WITH_MOD_BOOLEAN)
add_subdirectory(bsp)
endif()
+if(WITH_IK_SOLVER)
+ add_subdirectory(iksolver)
+endif()
+
if(WITH_IK_ITASC)
add_subdirectory(itasc)
endif()
diff --git a/intern/iksolver/CMakeLists.txt b/intern/iksolver/CMakeLists.txt
index 119cb6eaff0..711a70ff260 100644
--- a/intern/iksolver/CMakeLists.txt
+++ b/intern/iksolver/CMakeLists.txt
@@ -73,4 +73,4 @@ set(SRC
intern/TNT/version.h
)
-blender_add_lib(bf_intern_ik "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_iksolver "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/intern/iksolver/SConscript b/intern/iksolver/SConscript
index bdf7cd350ff..b88d3b1b713 100644
--- a/intern/iksolver/SConscript
+++ b/intern/iksolver/SConscript
@@ -5,5 +5,5 @@ sources = env.Glob('intern/*.cpp')
incs = 'intern ../moto/include ../memutil'
-env.BlenderLib ('bf_intern_ik', sources, Split(incs), [], libtype=['intern','player'], priority=[100,90] )
+env.BlenderLib ('bf_intern_iksolver', sources, Split(incs), [], libtype=['intern','player'], priority=[100,90] )
diff --git a/source/blender/ikplugin/CMakeLists.txt b/source/blender/ikplugin/CMakeLists.txt
index f37b254d719..903267c5618 100644
--- a/source/blender/ikplugin/CMakeLists.txt
+++ b/source/blender/ikplugin/CMakeLists.txt
@@ -29,7 +29,6 @@ set(INC
../blenlib
../makesdna
../../../intern/guardedalloc
- ../../../intern/iksolver/extern
)
set(INC_SYS
@@ -38,14 +37,22 @@ set(INC_SYS
set(SRC
intern/ikplugin_api.c
- intern/iksolver_plugin.c
BIK_api.h
intern/ikplugin_api.h
- intern/iksolver_plugin.h
- intern/itasc_plugin.h
)
+if(WITH_IK_SOLVER)
+ add_definitions(-DWITH_IK_SOLVER)
+ list(APPEND INC
+ ../../../intern/iksolver/extern
+ )
+ list(APPEND SRC
+ intern/iksolver_plugin.c
+ intern/iksolver_plugin.h
+ )
+endif()
+
if(WITH_IK_ITASC)
add_definitions(-DWITH_IK_ITASC)
list(APPEND INC
@@ -54,8 +61,8 @@ if(WITH_IK_ITASC)
)
list(APPEND SRC
intern/itasc_plugin.cpp
+ intern/itasc_plugin.h
)
endif()
-
blender_add_lib(bf_ikplugin "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/ikplugin/intern/ikplugin_api.c b/source/blender/ikplugin/intern/ikplugin_api.c
index 147c2b50e31..08d2789451c 100644
--- a/source/blender/ikplugin/intern/ikplugin_api.c
+++ b/source/blender/ikplugin/intern/ikplugin_api.c
@@ -45,13 +45,17 @@
#include "DNA_armature_types.h"
#include "ikplugin_api.h"
-#include "iksolver_plugin.h"
+
+#ifdef WITH_IK_SOLVER
+# include "iksolver_plugin.h"
+#endif
#ifdef WITH_IK_ITASC
-#include "itasc_plugin.h"
+# include "itasc_plugin.h"
#endif
static IKPlugin ikplugin_tab[] = {
+#ifdef WITH_IK_SOLVER
/* Legacy IK solver */
{
iksolver_initialize_tree,
@@ -61,8 +65,10 @@ static IKPlugin ikplugin_tab[] = {
NULL,
NULL,
NULL,
-#ifdef WITH_IK_ITASC
},
+#endif
+
+#ifdef WITH_IK_ITASC
/* iTaSC IK solver */
{
itasc_initialize_tree,
@@ -72,8 +78,8 @@ static IKPlugin ikplugin_tab[] = {
itasc_clear_cache,
itasc_update_param,
itasc_test_constraint,
-#endif
- }
+ },
+ #endif
};
static IKPlugin *get_plugin(bPose *pose)
diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt
index 5a71b51c5dd..44991adcc9d 100644
--- a/source/blenderplayer/CMakeLists.txt
+++ b/source/blenderplayer/CMakeLists.txt
@@ -110,7 +110,7 @@ endif()
ge_scenegraph
bf_ikplugin
bf_intern_itasc
- bf_intern_ik
+ bf_intern_iksolver
bf_intern_smoke
bf_modifiers
bf_intern_moto
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index a3a3a13130c..26ca390239b 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -862,7 +862,6 @@ endif()
bf_intern_bsp
bf_intern_decimate
bf_intern_elbeem
- bf_intern_ik
bf_intern_memutil
bf_intern_guardedalloc
bf_intern_ctr
@@ -934,6 +933,10 @@ endif()
list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
endif()
+ if(WITH_IK_SOLVER)
+ list_insert_after(BLENDER_SORTED_LIBS "bf_intern_elbeem" "bf_intern_iksolver")
+ endif()
+
if(WITH_IK_ITASC)
list(APPEND BLENDER_SORTED_LIBS bf_intern_itasc)
endif()