Commit 4af9cd25 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] Boost: use only components

parent 914528c9
......@@ -55,8 +55,9 @@ ADD_LIBRARY(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM PUBLIC ${PYTHON_INCLUDE_DIRS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC ${Boost_LIBRARIES}
${PYTHON_LIBRARY} Boost::python dynamic-graph::dynamic-graph)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC ${PYTHON_LIBRARY}
dynamic-graph::dynamic-graph)
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME} PRIVATE)
IF(SUFFIX_SO_VERSION)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
......
......@@ -6,7 +6,7 @@ TARGET_LINK_LIBRARIES(interpreter-test ${PROJECT_NAME})
# Test runfile
ADD_UNIT_TEST(interpreter-test-runfile interpreter-test-runfile.cc)
TARGET_LINK_LIBRARIES(interpreter-test-runfile ${PYTHON_LIBRARY} ${Boost_LIBRARIES} ${PROJECT_NAME})
TARGET_LINK_LIBRARIES(interpreter-test-runfile ${PROJECT_NAME} Boost::unit_test_framework)
TARGET_COMPILE_DEFINITIONS(interpreter-test-runfile PRIVATE PATH="${CMAKE_CURRENT_LIST_DIR}/")
# Test the module generation
......@@ -44,10 +44,11 @@ IF(UNIX AND NOT APPLE)
TARGET_LINK_LIBRARIES(${PYTHON_MODULE} "-Wl,--no-as-needed")
ENDIF(UNIX AND NOT APPLE)
TARGET_LINK_LIBRARIES(${PYTHON_MODULE}
TARGET_LINK_LIBRARIES(${PYTHON_MODULE} PRIVATE
${LIBRARY_NAME} dynamic-graph-python
${PYTHON_LIBRARY} ${Boost_PYTHON_LIBRARIES})
TARGET_INCLUDE_DIRECTORIES(${PYTHON_MODULE} SYSTEM PUBLIC ${PYTHON_INCLUDE_DIRS})
${PYTHON_LIBRARY})
TARGET_LINK_BOOST_PYTHON(${PYTHON_MODULE} PRIVATE)
TARGET_INCLUDE_DIRECTORIES(${PYTHON_MODULE} SYSTEM PRIVATE ${PYTHON_INCLUDE_DIRS})
## Test it
ADD_PYTHON_UNIT_TEST("test-custom-entity" "tests/test_custom_entity.py" src 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