Commit 45cbd152 authored by DanmeiChen's avatar DanmeiChen

Feature/make framework on macos

parent 2fc873f4
......@@ -44,7 +44,7 @@ MARK_AS_ADVANCED(SOCI_INCLUDE_DIRS)
#
FIND_LIBRARY(SOCI_LIBRARIES
NAMES soci_core soci_core${_SOCI_VERSION}
PATH_SUFFIXES lib lib64)
PATH_SUFFIXES Frameworks lib lib64)
MARK_AS_ADVANCED(SOCI_LIBRARIES)
GET_FILENAME_COMPONENT(SOCI_LIBRARY_DIR ${SOCI_LIBRARIES} PATH)
......@@ -61,7 +61,7 @@ IF(SOCI_INCLUDE_DIRS AND SOCI_LIBRARIES)
FIND_LIBRARY(
SOCI_${plugin}_PLUGIN
NAMES soci_${plugin} soci_${plugin}${_SOCI_VERSION}
PATH_SUFFIXES lib lib64)
PATH_SUFFIXES Frameworks lib lib64)
MARK_AS_ADVANCED(SOCI_${plugin}_PLUGIN)
IF(SOCI_${plugin}_PLUGIN)
......
......@@ -140,7 +140,7 @@ set(LINPHONE_HEADER_FILES ${ROOT_HEADER_FILES} ${C_API_HEADER_FILES} ${ENUMS_HEA
set(LINPHONE_HEADER_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" PARENT_SCOPE)
# ------------------------------------------------------------------------------
if (IOS AND ENABLE_SHARED)
if (APPLE AND ENABLE_SHARED)
#cmake 3.10 seems not able to handle subdirectories for PUBLIC_HEADER. My be rework in the futur
set(DEST_ROOT_DIRECTORY "${CMAKE_INSTALL_PREFIX}/Frameworks/linphone.framework/Headers")
else()
......
......@@ -436,8 +436,7 @@ if(ENABLE_SHARED)
$<TARGET_OBJECTS:linphone-coreapi>
)
target_compile_definitions(linphone PRIVATE "-DLINPHONE_EXPORTS")
#TODO: replace by if(APPLE) when we want to make apple framework on linphone-desktop too
if(IOS)
if(APPLE)
if(IOS)
set(MIN_OS ${LINPHONE_IOS_DEPLOYMENT_TARGET})
else()
......
......@@ -46,6 +46,13 @@ target_compile_definitions(linphone++ PRIVATE "-DLINPHONECXX_EXPORTS")
target_link_libraries(linphone++
PRIVATE ${BCTOOLBOX_CORE_LIBRARIES} ${BELLESIP_LIBRARIES} linphone
)
set_target_properties(linphone++ PROPERTIES
FRAMEWORK TRUE
MACOSX_FRAMEWORK_IDENTIFIER org.linphone.linphone++
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/build/osx/Info.plist.in"
)
target_include_directories(linphone++
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/include
PRIVATE ${PROJECT_BINARY_DIR}/include
......@@ -60,6 +67,7 @@ install(TARGETS linphone++ EXPORT LinphoneCxxTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
FRAMEWORK DESTINATION Frameworks
)
install(FILES object.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/linphone++
......
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