tools: enable them on iOS

parent 70cfc320
......@@ -76,6 +76,11 @@ macro(apply_compile_flags SOURCE_FILES)
endif()
endmacro()
if(ENABLE_STATIC)
set(LINPHONE_LIBS_FOR_TOOLS linphone-static)
else()
set(LINPHONE_LIBS_FOR_TOOLS linphone)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
......
......@@ -57,7 +57,6 @@ if(@ENABLE_SHARED@)
else()
set(LINPHONE_LIBRARIES linphone-static)
endif()
set(LINPHONE_LDFLAGS @LINK_FLAGS@)
list(APPEND LINPHONE_INCLUDE_DIRS ${MEDIASTREAMER2_INCLUDE_DIRS} ${BELLESIP_INCLUDE_DIRS})
list(APPEND LINPHONE_LIBRARIES ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES})
set(LINPHONE_CPPFLAGS "${MEDIASTREAMER2_CPPFLAGS}")
......
......@@ -20,11 +20,6 @@
#
############################################################################
if(ENABLE_STATIC)
set(LINPHONE_LIBS_FOR_TESTER linphone-static)
else()
set(LINPHONE_LIBS_FOR_TESTER linphone)
endif()
set(OTHER_LIBS_FOR_TESTER ${BCTOOLBOX_LIBRARIES} ${BCTOOLBOX_TESTER_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES} ${XML2_LIBRARIES})
if(INTL_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${INTL_LIBRARIES})
......@@ -90,7 +85,7 @@ if(ANDROID OR IOS)
add_library(linphonetester STATIC ${SOURCE_FILES_C})
endif()
target_include_directories(linphonetester PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS})
target_link_libraries(linphonetester linphone ${OTHER_LIBS_FOR_TESTER})
target_link_libraries(linphonetester ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER})
install(TARGETS linphonetester
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
......@@ -104,7 +99,7 @@ if(ANDROID OR IOS)
elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
add_library(linphone_tester_static STATIC ${SOURCE_FILES_C})
target_include_directories(linphone_tester_static PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS})
target_link_libraries(linphone_tester_static linphone ${OTHER_LIBS_FOR_TESTER})
target_link_libraries(linphone_tester_static ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER})
set(RUNTIME_COMPONENT_SOURCES
liblinphone_tester_windows.cpp
......@@ -137,13 +132,13 @@ 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_target_properties(liblinphone_tester PROPERTIES LINK_FLAGS "-framework CoreFoundation -framework AudioToolbox -framework CoreAudio -framework Foundation -framework QuartzCore -framework OpenGLES -framework UIKit -framework AVFoundation -framework CoreGraphics -framework CoreMedia -framework CoreVideo -framework VideoToolbox")
set_target_properties(liblinphone_tester PROPERTIES LINK_FLAGS "${MEDIASTREAMER2_LDFLAGS}")
else()
add_executable(liblinphone_tester ${SOURCE_FILES_C} ${SOURCE_FILES_OBJC})
endif()
set_target_properties(liblinphone_tester PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(liblinphone_tester PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS})
target_link_libraries(liblinphone_tester ${LINPHONE_LIBS_FOR_TESTER} ${OTHER_LIBS_FOR_TESTER})
target_link_libraries(liblinphone_tester ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER})
if (GTK2_FOUND)
target_compile_definitions(liblinphone_tester PRIVATE HAVE_GTK)
target_include_directories(liblinphone_tester PUBLIC ${GTK2_INCLUDE_DIRS})
......
......@@ -25,72 +25,59 @@ if(MSVC)
find_library(LIBMINGWEX NAMES mingwex)
endif()
set(USE_BUNDLE )
if (IOS)
set(USE_BUNDLE MACOSX_BUNDLE)
endif()
set(LP_GEN_WRAPPERS_SOURCE_FILES
generator.cc
generator.hh
genwrappers.cc
software-desc.cc
software-desc.hh
)
add_definitions(
-DIN_LINPHONE
)
)
add_definitions(-DIN_LINPHONE)
set(LP_GEN_WRAPPERS_LIBS
${LIBGCC}
${LIBMINGWEX}
${XML2_LIBRARIES}
)
)
apply_compile_flags(LP_GEN_WRAPPERS_SOURCE_FILES "CPP" "CXX")
add_executable(lp-gen-wrappers ${LP_GEN_WRAPPERS_SOURCE_FILES})
add_executable(lp-gen-wrappers ${USE_BUNDLE} ${LP_GEN_WRAPPERS_SOURCE_FILES})
target_link_libraries(lp-gen-wrappers ${LP_GEN_WRAPPERS_LIBS})
install(TARGETS lp-gen-wrappers
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
set(LP_AUTO_ANSWER_SOURCE_FILES
auto_answer.c
)
add_definitions(
-DIN_LINPHONE
)
set(LP_AUTO_ANSWER_SOURCE_FILES auto_answer.c)
apply_compile_flags(LP_AUTO_ANSWER_SOURCE_FILES "CPP" "C")
add_executable(lp-auto-answer ${LP_AUTO_ANSWER_SOURCE_FILES})
target_link_libraries(lp-auto-answer linphone ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES})
install(TARGETS lp-auto-answer
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
set(LP_SENDMSG_SOURCE_FILES
lpsendmsg.c
)
add_definitions(
-DIN_LINPHONE
)
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 "${MEDIASTREAMER2_LDFLAGS}")
set(LP_SENDMSG_SOURCE_FILES lpsendmsg.c)
apply_compile_flags(LP_SENDMSG_SOURCE_FILES "CPP" "C")
add_executable(lp-sendmsg ${LP_SENDMSG_SOURCE_FILES})
target_link_libraries(lp-sendmsg linphone ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES})
install(TARGETS lp-sendmsg
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
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 "${MEDIASTREAMER2_LDFLAGS}")
if (NOT IOS)
install(TARGETS lp-gen-wrappers
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install(TARGETS lp-auto-answer
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install(TARGETS lp-sendmsg
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
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