cmake option to build without iksolver
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -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()
 | 
			
		||||
 
 | 
			
		||||
@@ -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}")
 | 
			
		||||
 
 | 
			
		||||
@@ -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] )
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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}")
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -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 
 | 
			
		||||
 
 | 
			
		||||
@@ -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()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user