Commit 488f574f authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] fix pinocchio detection

ref https://github.com/loco-3d/multicontact-api/issues/5
parent 2dfe1ad3
......@@ -29,11 +29,11 @@ PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
# Project dependencies
ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES eigen3)
ADD_PROJECT_DEPENDENCY(pinocchio)
OPTION(CURVES_WITH_PINOCCHIO_SUPPORT "Build with pinocchio support" ${PINOCCHIO_FOUND})
OPTION(CURVES_WITH_PINOCCHIO_SUPPORT "Build with pinocchio support" ${pinocchio_FOUND})
IF(CURVES_WITH_PINOCCHIO_SUPPORT)
IF(NOT PINOCCHIO_FOUND)
IF(NOT pinocchio_FOUND)
MESSAGE(FATAL_ERROR "CURVES_WITH_PINOCCHIO_SUPPORT selected, but pinocchio has not been found")
ENDIF(NOT PINOCCHIO_FOUND)
ENDIF(NOT pinocchio_FOUND)
ADD_DEFINITIONS(-DCURVES_WITH_PINOCCHIO_SUPPORT)
PKG_CONFIG_APPEND_CFLAGS("-DCURVES_WITH_PINOCCHIO_SUPPORT")
ENDIF(CURVES_WITH_PINOCCHIO_SUPPORT)
......@@ -84,7 +84,7 @@ ADD_LIBRARY(${PROJECT_NAME} INTERFACE)
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM INTERFACE ${EIGEN3_INCLUDE_DIRS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
IF(CURVES_WITH_PINOCCHIO_SUPPORT)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} pinocchio::pinocchio)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} INTERFACE pinocchio::pinocchio)
ENDIF(CURVES_WITH_PINOCCHIO_SUPPORT)
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
......
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