cmake option to build without iksolver
authorCampbell Barton <ideasman42@gmail.com>
Sat, 18 Aug 2012 13:36:29 +0000 (13:36 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 18 Aug 2012 13:36:29 +0000 (13:36 +0000)
CMakeLists.txt
intern/CMakeLists.txt
intern/iksolver/CMakeLists.txt
intern/iksolver/SConscript
source/blender/ikplugin/CMakeLists.txt
source/blender/ikplugin/intern/ikplugin_api.c
source/blenderplayer/CMakeLists.txt
source/creator/CMakeLists.txt

index 94eea7b..fd47388 100644 (file)
@@ -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)
index 2b4a84d..d520ffc 100644 (file)
@@ -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()
index 119cb6e..711a70f 100644 (file)
@@ -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}")
index bdf7cd3..b88d3b1 100644 (file)
@@ -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] )
 
index f37b254..903267c 100644 (file)
@@ -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}")
index 147c2b5..08d2789 100644 (file)
 #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)
index 5a71b51..44991ad 100644 (file)
@@ -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 
index a3a3a13..26ca390 100644 (file)
@@ -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()