Skip to content

Commit

Permalink
Merge pull request #37 from nim65s/devel
Browse files Browse the repository at this point in the history
[CMake] fix pinocchio detection
  • Loading branch information
nim65s authored Apr 2, 2020
2 parents 2dfe1ad + b2a8563 commit 2f38554
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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 $<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)
Expand Down

0 comments on commit 2f38554

Please # to comment.