Commit 22e1f28d authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] sync submodule and its use

parent 954d5e10
Pipeline #10827 failed with stage
in 1 minute and 41 seconds
......@@ -34,17 +34,17 @@ PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
# Project dependencies
ADD_PROJECT_DEPENDENCY(dynamic-graph REQUIRED PKG_CONFIG_REQUIRES dynamic-graph)
SET(BOOST_COMPONENTS unit_test_framework)
IF(BUILD_TESTING)
FIND_PACKAGE(Boost REQUIRED COMPONENTS unit_test_framework)
ENDIF(BUILD_TESTING)
IF(BUILD_PYTHON_INTERFACE)
FINDPYTHON()
ADD_PROJECT_DEPENDENCY(dynamic-graph-python REQUIRED
PKG_CONFIG_REQUIRES dynamic-graph-python)
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
SEARCH_FOR_BOOST_PYTHON(REQUIRED)
ENDIF(BUILD_PYTHON_INTERFACE)
SEARCH_FOR_BOOST()
# Main Library
SET(${PROJECT_NAME}_HEADERS
include/${CUSTOM_HEADER_DIR}/inverted-pendulum.hh
......@@ -59,8 +59,7 @@ SET(${PROJECT_NAME}_SOURCES
ADD_LIBRARY(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Boost_LIBRARIES}
dynamic-graph::dynamic-graph)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC dynamic-graph::dynamic-graph)
IF(SUFFIX_SO_VERSION)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
......
Subproject commit 321eb1ccf1d94570eb564f3659b13ef3ef82239e
Subproject commit 91f97c1c31608f48d697a6b11037f13e878b9837
IF(BUILD_PYTHON_INTERFACE)
PYTHON_INSTALL_ON_SITE("dynamic_graph/tutorial" simu.py)
DYNAMIC_GRAPH_PYTHON_MODULE("tutorial" ${PROJECT_NAME} wrap)
DYNAMIC_GRAPH_PYTHON_MODULE("tutorial" ${PROJECT_NAME} tutorial-wrap)
ENDIF(BUILD_PYTHON_INTERFACE)
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
ADD_UNIT_TEST(pendulum pendulum.cpp)
TARGET_LINK_LIBRARIES(pendulum ${PROJECT_NAME} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} dynamic-graph::dynamic-graph)
TARGET_INCLUDE_DIRECTORIES(pendulum PUBLIC dynamic-graph::dynamic-graph)
TARGET_LINK_LIBRARIES(pendulum PRIVATE ${PROJECT_NAME} Boost::unit_test_framework)
ADD_UNIT_TEST(controller controller.cpp)
TARGET_LINK_LIBRARIES(controller ${PROJECT_NAME} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} dynamic-graph::dynamic-graph)
TARGET_INCLUDE_DIRECTORIES(controller PUBLIC dynamic-graph::dynamic-graph)
TARGET_LINK_LIBRARIES(controller PRIVATE ${PROJECT_NAME} Boost::unit_test_framework)
IF(BUILD_PYTHON_INTERFACE)
ADD_PYTHON_UNIT_TEST(simu "tests/simu.py" src)
......
Supports Markdown
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