Commit 53b9fb07 authored by Olivier Stasse's avatar Olivier Stasse
Browse files

[cmake] Fix target_link_libraries to fix the link dependencies and interface.

This avoid unnecessary target_include_directories.
parent d0d934ec
...@@ -115,13 +115,13 @@ FOREACH(path ${tests}) ...@@ -115,13 +115,13 @@ FOREACH(path ${tests})
GET_FILENAME_COMPONENT(test ${path} NAME) GET_FILENAME_COMPONENT(test ${path} NAME)
ADD_UNIT_TEST(${test} ${path}.cpp) ADD_UNIT_TEST(${test} ${path}.cpp)
TARGET_LINK_LIBRARIES(${test} ${PROJECT_NAME} ${Boost_LIBRARIES} TARGET_LINK_LIBRARIES(${test}
PUBLIC
${PROJECT_NAME}
${Boost_LIBRARIES}
${TEST_${test}_LIBS} ${TEST_${test}_EXT_LIBS} ${TEST_${test}_LIBS} ${TEST_${test}_EXT_LIBS}
dynamic-graph::dynamic-graph) dynamic-graph::dynamic-graph)
TARGET_INCLUDE_DIRECTORIES(${test}
SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})
IF(UNIX) IF(UNIX)
TARGET_LINK_LIBRARIES(${test} ${CMAKE_DL_LIBS}) TARGET_LINK_LIBRARIES(${test} ${CMAKE_DL_LIBS})
ENDIF(UNIX) ENDIF(UNIX)
......
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