Commit 27a66271 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 d19f88c2
......@@ -115,13 +115,13 @@ FOREACH(path ${tests})
GET_FILENAME_COMPONENT(test ${path} NAME)
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}
dynamic-graph::dynamic-graph)
TARGET_INCLUDE_DIRECTORIES(${test}
SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})
IF(UNIX)
TARGET_LINK_LIBRARIES(${test} ${CMAKE_DL_LIBS})
ENDIF(UNIX)
......
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