cmake: fix LDFLAGS (use belle-sip ones too) for iOS

parent 0f77c451
......@@ -184,6 +184,22 @@ if(UNIX AND NOT APPLE)
check_include_files(libudev.h HAVE_LIBUDEV_H)
endif()
set(LINPHONE_LDFLAGS "${BELLESIP_LDFLAGS} ${MEDIASTREAMER2_LDFLAGS}")
if(BELCARD_FOUND AND APPLE)
set(LINPHONE_LDFLAGS "${LINPHONE_LDFLAGS} -stdlib=libc++")
endif()
set(OTHER_LIBS_FOR_TESTER ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES} ${XML2_LIBRARIES})
if(INTL_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${INTL_LIBRARIES})
endif()
if(SQLITE3_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${SQLITE3_LIBRARIES})
endif()
if(ZLIB_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${ZLIB_LIBRARIES})
endif()
# include_directories must be called only UNDER THIS LINE in order to use our
# projects submodules first (we do NOT want to have system headers in first position)
include_directories(
......
......@@ -20,17 +20,6 @@
#
############################################################################
set(OTHER_LIBS_FOR_TESTER ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES} ${XML2_LIBRARIES})
if(INTL_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${INTL_LIBRARIES})
endif()
if(SQLITE3_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${SQLITE3_LIBRARIES})
endif()
if(ZLIB_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${ZLIB_LIBRARIES})
endif()
set(RESOURCES_FILES
certificates
flexisip
......@@ -161,11 +150,7 @@ if (NOT ANDROID AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if (IOS)
set_source_files_properties(${RESOURCES_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
add_executable(liblinphone_tester MACOSX_BUNDLE ${RESOURCES_FILES} ${SOURCE_FILES_C} ${SOURCE_FILES_OBJC})
set(LINK_FLAGS ${MEDIASTREAMER2_LDFLAGS})
if(BELCARD_FOUND)
set(LINK_FLAGS "${LINK_FLAGS} -stdlib=libc++")
endif()
set_target_properties(liblinphone_tester PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
set_target_properties(liblinphone_tester PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
else()
add_executable(liblinphone_tester ${SOURCE_FILES_C} ${SOURCE_FILES_OBJC})
endif()
......
......@@ -45,11 +45,6 @@ set(LP_GEN_WRAPPERS_LIBS
${XML2_LIBRARIES}
)
set(LINK_FLAGS ${MEDIASTREAMER2_LDFLAGS})
if(BELCARD_FOUND AND APPLE)
set(LINK_FLAGS "${LINK_FLAGS} -stdlib=libc++")
endif()
apply_compile_flags(LP_GEN_WRAPPERS_SOURCE_FILES "CPP" "CXX")
add_executable(lp-gen-wrappers ${USE_BUNDLE} ${LP_GEN_WRAPPERS_SOURCE_FILES})
target_link_libraries(lp-gen-wrappers ${LP_GEN_WRAPPERS_LIBS})
......@@ -57,14 +52,14 @@ target_link_libraries(lp-gen-wrappers ${LP_GEN_WRAPPERS_LIBS})
set(LP_AUTO_ANSWER_SOURCE_FILES auto_answer.c)
apply_compile_flags(LP_AUTO_ANSWER_SOURCE_FILES "CPP" "C")
add_executable(lp-auto-answer ${USE_BUNDLE} ${LP_AUTO_ANSWER_SOURCE_FILES})
target_link_libraries(lp-auto-answer ${LINPHONE_LIBS_FOR_TOOLS} ${MEDIASTREAMER2_LIBRARIES})
set_target_properties(lp-auto-answer PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
target_link_libraries(lp-auto-answer ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER})
set_target_properties(lp-auto-answer PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
set(LP_SENDMSG_SOURCE_FILES lpsendmsg.c)
apply_compile_flags(LP_SENDMSG_SOURCE_FILES "CPP" "C")
add_executable(lp-sendmsg ${USE_BUNDLE} ${LP_SENDMSG_SOURCE_FILES})
target_link_libraries(lp-sendmsg ${LINPHONE_LIBS_FOR_TOOLS} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES})
set_target_properties(lp-sendmsg PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
target_link_libraries(lp-sendmsg ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER})
set_target_properties(lp-sendmsg PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
if (NOT IOS)
install(TARGETS lp-gen-wrappers
......
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