diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e16989..c7adeb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,8 +44,7 @@ PROJECT(${PROJECT_NAME} ${PROJECT_ARGS}) # Project dependencies ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES "eigen3 >= 3.2.92") -SET(BOOST_COMPONENTS unit_test_framework) -SEARCH_FOR_BOOST() +FIND_PACKAGE(Boost REQUIRED COMPONENTS unit_test_framework) # Main Library SET(${PROJECT_NAME}_HEADERS @@ -65,8 +64,7 @@ IF(TRACE_SOLVER) TARGET_COMPILE_DEFINITIONS(${PROJECT_NAME} PRIVATE TRACE_SOLVER) ENDIF(TRACE_SOLVER) -TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM PRIVATE ${EIGEN3_INCLUDE_DIR}) -TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM INTERFACE ${EIGEN3_INCLUDE_DIR}) +TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIR}) TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} INTERFACE $) INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib) diff --git a/cmake b/cmake index 0ec0f54..c6e4768 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 0ec0f542c02839bcbdf1faa8f5a4559dcf8632ec +Subproject commit c6e4768fc40c1da1bdee04354538151b9c898acf diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f918ddc..61c8630 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -23,18 +23,14 @@ SET(TESTS eiquadprog-fast eiquadprog-rt eiquadprog-both + test-integration ) FOREACH(test ${TESTS}) ADD_UNIT_TEST(${test} ${test}.cpp) - TARGET_LINK_LIBRARIES(${test} ${PROJECT_NAME} - ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) + TARGET_LINK_LIBRARIES(${test} ${PROJECT_NAME} Boost::unit_test_framework) ENDFOREACH(test ${TESTS}) ADD_LIBRARY(testab SHARED TestA.cpp TestB.cpp) -TARGET_INCLUDE_DIRECTORIES(testab SYSTEM PRIVATE ${EIGEN3_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES( testab ${PROJECT_NAME}) - -ADD_UNIT_TEST(test-integration test-integration.cpp ) -TARGET_LINK_LIBRARIES(test-integration - testab ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +TARGET_LINK_LIBRARIES(testab ${PROJECT_NAME}) +TARGET_LINK_LIBRARIES(test-integration testab)