Commit 01f90b26 authored by Ghislain MARY's avatar Ghislain MARY

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

parent 540644f6
......@@ -48,7 +48,7 @@ endif()
if(ENABLE_SHARED)
add_library(bzrtp SHARED ${SOURCE_FILES})
set_target_properties(bzrtp PROPERTIES VERSION 0)
target_link_libraries(bzrtp ${LIBS})
target_link_libraries(bzrtp PRIVATE ${LIBS})
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/bzrtp.pdb
......
......@@ -45,10 +45,13 @@ apply_compile_flags(TEST_SOURCES "CPP")
add_executable(bzrtpTest ${TEST_SOURCES})
set_target_properties(bzrtpTest PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
target_include_directories(bzrtpTest PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIR})
target_link_libraries(bzrtpTest ${BCTOOLBOX_TESTER_LIBRARIES} ${PROJECT_LIBS})
target_link_libraries(bzrtpTest ${BCTOOLBOX_LIBRARIES} ${BCTOOLBOX_TESTER_LIBRARIES} ${PROJECT_LIBS})
if(HAVE_SQRT)
target_link_libraries(bzrtpTest m)
endif()
if(XML2_FOUND)
target_link_libraries(bzrtpTest ${XML2_LIBRARIES})
endif()
unset(PATTERN_FILES_IN_TEST_DIR CACHE)
find_file(PATTERN_FILES_IN_TEST_DIR
......
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