Commit 00dd3c00 authored by Ghislain MARY's avatar Ghislain MARY

Do not include dependencies in the link interface when building a shared library.

parent e74398bf
......@@ -180,7 +180,7 @@ if(ENABLE_SHARED)
set_target_properties(bellesip PROPERTIES SOVERSION 0)
set_target_properties(bellesip PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(bellesip PUBLIC ${INCLUDES})
target_link_libraries(bellesip ${LIBS})
target_link_libraries(bellesip PRIVATE ${LIBS})
if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(bellesip PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
......
......@@ -93,8 +93,11 @@ else()
if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(belle_sip_tester PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
if(WIN32)
target_link_libraries(belle_sip_tester "Ws2_32")
endif()
target_include_directories(belle_sip_tester PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS})
target_link_libraries(belle_sip_tester ${BCTOOLBOX_TESTER_LIBRARIES} ${PROJECT_LIBS})
target_link_libraries(belle_sip_tester ${BCTOOLBOX_LIBRARIES} ${BCTOOLBOX_TESTER_LIBRARIES} ${PROJECT_LIBS})
add_test(NAME belle_sip_tester COMMAND belle_sip_tester --verbose)
......@@ -104,7 +107,7 @@ else()
if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(belle_sip_object_describe PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
target_link_libraries(belle_sip_object_describe ${PROJECT_LIBS})
target_link_libraries(belle_sip_object_describe ${BCTOOLBOX_LIBRARIES} ${PROJECT_LIBS})
set(PARSE_SOURCES parse.c)
......@@ -114,6 +117,6 @@ else()
if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(belle_sip_parse PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
target_link_libraries(belle_sip_parse ${PROJECT_LIBS})
target_link_libraries(belle_sip_parse ${BCTOOLBOX_LIBRARIES} ${PROJECT_LIBS})
endif()
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