diff --git a/CMakeLists.txt b/CMakeLists.txt index 75600d4e..dcc5d52a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,14 +29,15 @@ 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) +SET(PACKAGE_EXTRA_MACROS "SET(CURVES_WITH_PINOCCHIO_SUPPORT ${CURVES_WITH_PINOCCHIO_SUPPORT})") SET(BOOST_COMPONENTS unit_test_framework serialization) @@ -84,7 +85,7 @@ ADD_LIBRARY(${PROJECT_NAME} INTERFACE) TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM INTERFACE ${EIGEN3_INCLUDE_DIRS}) TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} INTERFACE $) 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)