Commit 72579b86 authored by François Grisez's avatar François Grisez

Declare binary dependencies of mediastreamer2 as PRIVATE

parent fdc01612
......@@ -40,7 +40,6 @@ else()
find_package(ORTP REQUIRED)
find_package(BcToolbox 0.0.3 REQUIRED COMPONENTS core)
endif()
find_package(Matroska2)
if(@ENABLE_ZRTP@)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_bzrtp_CONFIG_DIR}/BZRTPConfig.cmake")
......@@ -62,10 +61,6 @@ else()
endif()
list(APPEND MEDIASTREAMER2_INCLUDE_DIRS ${ORTP_INCLUDE_DIRS} ${BCTOOLBOX_CORE_INCLUDE_DIRS})
list(APPEND MEDIASTREAMER2_LIBRARIES ${ORTP_LIBRARIES} ${BCTOOLBOX_CORE_LIBRARIES})
if(MATROSKA2_FOUND)
list(APPEND MEDIASTREAMER2_INCLUDE_DIRS ${MATROSKA2_INCLUDE_DIRS})
list(APPEND MEDIASTREAMER2_LIBRARIES ${MATROSKA2_LIBRARIES})
endif()
if(BZRTP_FOUND)
list(APPEND MEDIASTREAMER2_INCLUDE_DIRS ${BZRTP_INCLUDE_DIRS})
list(APPEND MEDIASTREAMER2_LIBRARIES ${BZRTP_LIBRARIES})
......
......@@ -659,7 +659,7 @@ if(ENABLE_SHARED)
# Do not version shared library on Android
set_target_properties(mediastreamer_voip PROPERTIES SOVERSION ${MEDIASTREAMER_SO_VERSION})
endif()
target_link_libraries(mediastreamer_voip mediastreamer_base ${VOIP_LIBS})
target_link_libraries(mediastreamer_voip PRIVATE mediastreamer_base ${VOIP_LIBS})
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/mediastreamer_voip.pdb
......
......@@ -147,7 +147,7 @@ else()
add_executable(mediastreamer2_tester ${SOURCE_FILES_C} ${SOURCE_FILES_OBJC})
endif()
target_include_directories(mediastreamer2_tester PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS})
target_link_libraries(mediastreamer2_tester ${MS2_LIBS_FOR_TESTER} ${BCTOOLBOX_TESTER_LIBRARIES})
target_link_libraries(mediastreamer2_tester ${MS2_LIBS_FOR_TESTER} ${BCTOOLBOX_TESTER_LIBRARIES} ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES})
string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
if(LINK_FLAGS_STR)
set_target_properties(mediastreamer2_tester PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
......
......@@ -38,13 +38,19 @@ endif()
set(simple_executables bench ring mtudiscover tones)
if(ENABLE_VIDEO)
list(APPEND simple_executables videodisplay test_x11window)
list(APPEND simple_executables videodisplay)
if(X11_FOUND)
list(APPEND simple_executables test_x11window)
endif()
endif()
foreach(simple_executable ${simple_executables})
set(${simple_executable}_SOURCE_FILES ${simple_executable}.c)
apply_compile_flags(${simple_executable}_SOURCE_FILES "CPP" "C")
add_executable(${simple_executable} ${USE_BUNDLE} ${simple_executable}.c)
target_link_libraries(${simple_executable} ${MS2_LIBS_FOR_TOOLS})
target_link_libraries(${simple_executable} ${MS2_LIBS_FOR_TOOLS} ${ORTP_LIBRARIES} ${BCTOOLBOX_CORE_LIBRARIES})
if(simple_executable STREQUAL "test_x11window")
target_link_libraries(${simple_executable} ${X11_LIBRARIES})
endif()
if(LINK_FLAGS_STR)
set_target_properties(${simple_executable} PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
......@@ -53,7 +59,7 @@ endforeach()
set(ECHO_SOURCE_FILES echo.c)
apply_compile_flags(ECHO_SOURCE_FILES "CPP" "C")
add_executable(ms-echo ${USE_BUNDLE} ${ECHO_SOURCE_FILES}) # Do not name the target "echo" to avoid conflict with the shell echo command
target_link_libraries(ms-echo ${MS2_LIBS_FOR_TOOLS})
target_link_libraries(ms-echo ${MS2_LIBS_FOR_TOOLS} ${ORTP_LIBRARIES})
if(LINK_FLAGS_STR)
set_target_properties(ms-echo PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
......@@ -78,7 +84,7 @@ if (NOT IOS)
apply_compile_flags(MEDIASTREAM_SOURCE_FILES_C "CPP" "C")
apply_compile_flags(MEDIASTREAM_SOURCE_FILES_OBJC "CPP" "OBJC")
add_executable(mediastream ${USE_BUNDLE} ${MEDIASTREAM_SOURCE_FILES_C} ${MEDIASTREAM_SOURCE_FILES_OBJC})
target_link_libraries(mediastream ${MS2_LIBS_FOR_TOOLS})
target_link_libraries(mediastream ${MS2_LIBS_FOR_TOOLS} ${ORTP_LIBRARIES})
if(LINK_FLAGS_STR)
set_target_properties(mediastream PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
......@@ -88,7 +94,7 @@ if(ENABLE_VIDEO)
set(MKVSTREAM_SOURCE_FILES mkvstream.c)
apply_compile_flags(MKVSTREAM_SOURCE_FILES "CPP" "C")
add_executable(mkvstream ${USE_BUNDLE} ${MKVSTREAM_SOURCE_FILES})
target_link_libraries(mkvstream ${MS2_LIBS_FOR_TOOLS})
target_link_libraries(mkvstream ${MS2_LIBS_FOR_TOOLS} ${ORTP_LIBRARIES})
if(LINK_FLAGS_STR)
set_target_properties(mkvstream PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
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