Commit ca33437b authored by Benjamin REIS's avatar Benjamin REIS

change static lib to framework in ios build

parent 57114440
......@@ -222,7 +222,13 @@ if(ENABLE_STATIC)
endif()
if(ENABLE_SHARED)
add_library(linphone SHARED ${LINPHONE_HEADER_FILES} ${LINPHONE_PRIVATE_HEADER_FILES} ${LINPHONE_SOURCE_FILES_C} ${LINPHONE_SOURCE_FILES_CXX} ${LINPHONE_SOURCE_FILES_OBJC})
if(APPLE)
set_target_properties(linphone PROPERTIES
FRAMEWORK TRUE
MACOSX_FRAMEWORK_IDENTIFIER com.belledonne-communications.linphone
PUBLIC_HEADER "${LINPHONE_HEADER_FILES}"
)
endif()
if(BELCARD_FOUND)
if(APPLE)
set_target_properties(linphone PROPERTIES LINK_FLAGS "-stdlib=libc++")
......@@ -260,6 +266,7 @@ if(ENABLE_SHARED)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
FRAMEWORK DESTINATION Frameworks
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
......
......@@ -222,23 +222,27 @@ endif()
# on mobile platforms, we compile the tester as a library so that we can link with it directly from native applications
if(ANDROID OR IOS)
add_library(linphonetester SHARED ${SOURCE_FILES_C})
if(ANDROID)
add_library(linphonetester SHARED ${SOURCE_FILES_C})
if(ENABLE_ARCH_SUFFIX)
set_target_properties(linphonetester PROPERTIES OUTPUT_NAME "linphonetester-${CMAKE_ANDROID_ARCH_ABI}")
else()
set_target_properties(linphonetester PROPERTIES OUTPUT_NAME "linphonetester")
endif()
endif()
if(IOS)
add_library(linphonetester STATIC ${SOURCE_FILES_C})
endif()
target_include_directories(linphonetester PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS})
target_link_libraries(linphonetester ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER})
if(IOS)
set_target_properties(linphonetester PROPERTIES
FRAMEWORK TRUE
MACOSX_FRAMEWORK_IDENTIFIER com.belledonne-communications.linphonetester
)
endif()
install(TARGETS linphonetester
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
FRAMEWORK DESTINATION Frameworks
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install(FILES "liblinphone_tester.h"
......
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