cmake: fix compilation when building with static libraries

parent 755c2132
......@@ -37,21 +37,21 @@ if(MSVC)
endif()
add_executable(linphonec ${LINPHONEC_SOURCE_FILES})
target_link_libraries(linphonec linphone ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES})
target_link_libraries(linphonec ${LINPHONE_LIBS_FOR_TOOLS} ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES})
if(INTL_FOUND)
target_link_libraries(linphonec ${INTL_LIBRARIES})
endif()
if(WIN32)
add_executable(linphoned WIN32 ${LINPHONEC_SOURCE_FILES})
target_link_libraries(linphoned linphone ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES})
target_link_libraries(linphoned ${LINPHONE_LIBS_FOR_TOOLS} ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES})
if(INTL_FOUND)
target_link_libraries(linphoned ${INTL_LIBRARIES})
endif()
endif()
add_executable(linphonecsh ${LINPHONECSH_SOURCE_FILES})
target_link_libraries(linphonecsh linphone ${ORTP_LIBRARIES})
target_link_libraries(linphonecsh ${LINPHONE_LIBS_FOR_TOOLS} ${ORTP_LIBRARIES})
set(INSTALL_TARGETS linphonec linphonecsh)
if(WIN32)
......
......@@ -114,10 +114,10 @@ apply_compile_flags(DAEMON_PIPETEST_SOURCE_FILES "CPP" "C")
add_executable(linphone-daemon ${DAEMON_SOURCE_FILES})
target_include_directories(linphone-daemon PRIVATE ${CMAKE_CURRENT_LIST_DIR})
target_link_libraries(linphone-daemon linphone ${MEDIASTREAMER2_LIBRARIES})
target_link_libraries(linphone-daemon ${LINPHONE_LIBS_FOR_TOOLS} ${MEDIASTREAMER2_LIBRARIES})
add_executable(linphone-daemon-pipetest ${DAEMON_PIPETEST_SOURCE_FILES})
target_link_libraries(linphone-daemon-pipetest linphone ${ORTP_LIBRARIES})
target_link_libraries(linphone-daemon-pipetest ${LINPHONE_LIBS_FOR_TOOLS} ${ORTP_LIBRARIES})
set(INSTALL_TARGETS linphone-daemon linphone-daemon-pipetest)
......
......@@ -94,7 +94,7 @@ else()
endif()
set_target_properties(linphone-gtk PROPERTIES OUTPUT_NAME linphone LINKER_LANGUAGE CXX)
target_include_directories(linphone-gtk PUBLIC ${GTK2_INCLUDE_DIRS} ${INTL_INCLUDE_DIRS})
target_link_libraries(linphone-gtk linphone ${GTK2_LIBRARIES} ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES})
target_link_libraries(linphone-gtk ${LINPHONE_LIBS_FOR_TOOLS} ${GTK2_LIBRARIES} ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES})
if(INTL_FOUND)
target_link_libraries(linphone-gtk ${INTL_LIBRARIES})
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