Commit f7d1919a authored by Justin Carpentier's avatar Justin Carpentier

cmake: only process dependencies if they have been activated

parent 01d57443
......@@ -99,7 +99,7 @@ IF(BUILD_WITH_AUTODIFF_SUPPORT)
ADD_REQUIRED_DEPENDENCY("cppad >= 20180000.0")
ENDIF(BUILD_WITH_AUTODIFF_SUPPORT)
IF(CPPAD_FOUND)
IF(CPPAD_FOUND AND BUILD_WITH_AUTODIFF_SUPPORT)
ADD_DEFINITIONS(-DPINOCCHIO_WITH_CPPAD_SUPPORT)
PKG_CONFIG_APPEND_CFLAGS("-DPINOCCHIO_WITH_CPPAD_SUPPORT")
IF(NOT ${CPPAD_VERSION} VERSION_GREATER "3.3.0")
......@@ -110,23 +110,23 @@ IF(CPPAD_FOUND)
IF(BUILD_WITH_CODEGEN_SUPPORT)
ADD_OPTIONAL_DEPENDENCY("cppadcg")
ENDIF(BUILD_WITH_CODEGEN_SUPPORT)
IF(CPPADCG_FOUND)
IF(CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT)
ADD_DEFINITIONS(-DPINOCCHIO_WITH_CPPADCG_SUPPORT)
PKG_CONFIG_APPEND_CFLAGS("-DPINOCCHIO_WITH_CPPADCG_SUPPORT")
ENDIF(CPPADCG_FOUND)
ENDIF(CPPAD_FOUND)
ENDIF(CPPAD_FOUND AND BUILD_WITH_AUTODIFF_SUPPORT)
IF(BUILD_WITH_CASADI_SUPPORT)
ADD_REQUIRED_DEPENDENCY("casadi >= 3.4.5")
ENDIF(BUILD_WITH_CASADI_SUPPORT)
IF(CASADI_FOUND)
IF(CASADI_FOUND AND BUILD_WITH_CASADI_SUPPORT)
ADD_DEFINITIONS(-DPINOCCHIO_WITH_CASADI_SUPPORT)
PKG_CONFIG_APPEND_CFLAGS("-DPINOCCHIO_WITH_CASADI_SUPPORT")
ENDIF(CASADI_FOUND)
ENDIF(CASADI_FOUND AND BUILD_WITH_CASADI_SUPPORT)
# Special care of urdfdom version
IF(URDFDOM_FOUND)
IF(URDFDOM_FOUND AND BUILD_WITH_URDF_SUPPORT)
IF(${URDFDOM_VERSION} VERSION_LESS "0.3.0")
ADD_DEFINITIONS(-DPINOCCHIO_URDFDOM_COLLISION_WITH_GROUP_NAME)
PKG_CONFIG_APPEND_CFLAGS("-DPINOCCHIO_URDFDOM_COLLISION_WITH_GROUP_NAME")
......@@ -143,7 +143,7 @@ IF(URDFDOM_FOUND)
ADD_DEFINITIONS(-DPINOCCHIO_URDFDOM_USE_STD_SHARED_PTR)
PKG_CONFIG_APPEND_CFLAGS("-DPINOCCHIO_URDFDOM_USE_STD_SHARED_PTR")
ENDIF(${URDFDOM_VERSION} VERSION_GREATER "0.4.2")
ENDIF(URDFDOM_FOUND)
ENDIF(URDFDOM_FOUND AND BUILD_WITH_URDF_SUPPORT)
# Special care of lua which can be of versions 5.1 or 5.2
# Priority is set to lua5.2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment