Commit 6646bd00 authored by Guilhem Saurel's avatar Guilhem Saurel

[CMake] sync submodule and its use

parent 3c56ebd1
Pipeline #11288 passed with stage
in 25 minutes and 54 seconds
......@@ -25,7 +25,7 @@ INCLUDE(cmake/python.cmake)
# Project definition
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
SET(CMAKE_CXX_STANDARD 11)
CHECK_MINIMAL_CXX_STANDARD(11 ENFORCE)
# Project dependencies
ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES eigen3)
......@@ -40,16 +40,14 @@ IF(CURVES_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)
ADD_PROJECT_DEPENDENCY(Boost REQUIRED COMPONENTS serialization)
IF(BUILD_PYTHON_INTERFACE)
FINDPYTHON()
SEARCH_FOR_BOOST_PYTHON(REQUIRED)
ADD_PROJECT_DEPENDENCY(eigenpy REQUIRED PKG_CONFIG_REQUIRES "eigenpy >= 1.6.8")
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
ENDIF(BUILD_PYTHON_INTERFACE)
SEARCH_FOR_BOOST()
# Main Library
SET(${PROJECT_NAME}_HEADERS
include/${PROJECT_NAME}/bernstein.h
......@@ -85,6 +83,7 @@ SET(${PROJECT_NAME}_HEADERS
ADD_LIBRARY(${PROJECT_NAME} INTERFACE)
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM INTERFACE ${EIGEN3_INCLUDE_DIR})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} INTERFACE Boost::serialization)
IF(CURVES_WITH_PINOCCHIO_SUPPORT)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} INTERFACE pinocchio::pinocchio)
ENDIF(CURVES_WITH_PINOCCHIO_SUPPORT)
......
Subproject commit fb4c22c319ec5320f9a85527eb1a4130954846f5
Subproject commit 32015cb28d977b592227675665d17d11531ef418
......@@ -12,7 +12,7 @@ SET(wrap ${PROJECT_NAME}_wrap)
ADD_LIBRARY(${wrap} SHARED ${${PROJECT_NAME}_WRAP_SOURCES})
SET_TARGET_PROPERTIES(${wrap} PROPERTIES OUTPUT_NAME ${PROJECT_NAME} PREFIX "")
TARGET_COMPILE_OPTIONS(${wrap} PRIVATE "-Wno-conversion")
TARGET_LINK_LIBRARIES(${wrap} ${Boost_LIBRARIES} eigenpy::eigenpy)
TARGET_LINK_LIBRARIES(${wrap} eigenpy::eigenpy)
IF(CURVES_WITH_PINOCCHIO_SUPPORT)
TARGET_LINK_LIBRARIES(${wrap} pinocchio::pinocchio)
ENDIF(CURVES_WITH_PINOCCHIO_SUPPORT)
......
ADD_UNIT_TEST(curves_tests Main.cpp)
TARGET_LINK_LIBRARIES(curves_tests ${PROJECT_NAME} ${Boost_LIBRARIES})
TARGET_LINK_LIBRARIES(curves_tests ${PROJECT_NAME})
TARGET_COMPILE_DEFINITIONS(curves_tests PRIVATE -DTEST_DATA_PATH="${CMAKE_CURRENT_SOURCE_DIR}/data/")
SET(${PROJECT_NAME}_TESTS
......@@ -11,6 +11,5 @@ SET(${PROJECT_NAME}_TESTS
FOREACH(TEST ${${PROJECT_NAME}_TESTS})
ADD_UNIT_TEST(${TEST} ${TEST})
TARGET_LINK_LIBRARIES(${TEST} ${PROJECT_NAME} ${Boost_LIBRARIES})
TARGET_LINK_LIBRARIES(${TEST} ${PROJECT_NAME})
ENDFOREACH(TEST ${${PROJECT_NAME}_TESTS})
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