From 949acf2f70df3617bbb6116b95e2e62aa8e12a1f Mon Sep 17 00:00:00 2001 From: Pariterre Date: Thu, 9 Apr 2020 22:24:06 -0400 Subject: [PATCH 1/2] removed unnecessary test in cmakelists --- CMakeLists.txt | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 720de16..74353bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,31 +65,6 @@ OPTION (RBDL_BUILD_PYTHON_WRAPPER "Build experimental python wrapper" OFF) OPTION (RBDL_BUILD_ADDON_GEOMETRY "Build the geometry library" OFF) OPTION (RBDL_BUILD_ADDON_MUSCLE "Build the muscle library" OFF) -# Make sure only one math library is selected priorizing the following order: Casadi, Eigen, Simple -IF (RBDL_USE_CASADI_MATH) - IF(RBDL_USE_SIMPLE_MATH) - MESSAGE (WARNING "You can not use both Casadi and Simple math. Automatically choosing RBDL_USE_CASADI_MATH.") - SET (RBDL_USE_SIMPLE_MATH OFF) - ENDIF(RBDL_USE_SIMPLE_MATH) - - IF (RBDL_USE_EIGEN3_MATH) - MESSAGE (WARNING "You can not use both Casadi and Eigen3 math. Automatically choosing RBDL_USE_CASADI_MATH.") - SET (RBDL_USE_EIGEN3_MATH OFF) - ENDIF(RBDL_USE_EIGEN3_MATH) -ENDIF(RBDL_USE_CASADI_MATH) - -IF (RBDL_USE_EIGEN3_MATH) - IF(RBDL_USE_SIMPLE_MATH) - MESSAGE (WARNING "You can not use both Eigen and Simple math. Automatically choosing RBDL_USE_EIGEN3_MATH.") - SET (RBDL_USE_SIMPLE_MATH OFF) - ENDIF(RBDL_USE_SIMPLE_MATH) -ENDIF (RBDL_USE_EIGEN3_MATH) - -IF (NOT RBDL_USE_CASADI_MATH AND NOT RBDL_USE_EIGEN3_MATH AND NOT RBDL_USE_SIMPLE_MATH) - MESSAGE (WARNING "You have to choose exactly one library. Automatically choosing RBDL_USE_EIGEN3_MATH.") - SET(RBDL_USE_EIGEN3_MATH ON) -ENDIF (NOT RBDL_USE_CASADI_MATH AND NOT RBDL_USE_EIGEN3_MATH AND NOT RBDL_USE_SIMPLE_MATH) - # Loading the appropriate packages IF (RBDL_USE_CASADI_MATH) FIND_PACKAGE (Casadi REQUIRED) From fcffaacca2248832d7e9033c852cb6ee13cefafb Mon Sep 17 00:00:00 2001 From: Pariterre Date: Thu, 9 Apr 2020 22:24:31 -0400 Subject: [PATCH 2/2] Added Casadi in link library (for mac) --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74353bb..72116da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,6 +150,11 @@ IF (RBDL_BUILD_STATIC) rbdl_luamodel-static ) ENDIF (RBDL_BUILD_ADDON_LUAMODEL) + IF (RBDL_USE_CASADI_MATH) + TARGET_LINK_LIBRARIES ( rbdl-static + ${Casadi_LIBRARY} + ) + ENDIF (RBDL_USE_CASADI_MATH) INSTALL (TARGETS rbdl-static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} @@ -166,6 +171,11 @@ ELSE (RBDL_BUILD_STATIC) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) + IF (RBDL_USE_CASADI_MATH) + TARGET_LINK_LIBRARIES ( rbdl + ${Casadi_LIBRARY} + ) + ENDIF (RBDL_USE_CASADI_MATH) ENDIF (RBDL_BUILD_STATIC) IF (RBDL_STORE_VERSION)