Commit 8f240809 authored by DanmeiChen's avatar DanmeiChen Committed by DanmeiChen

fix build again

parent 1563d23a
......@@ -48,21 +48,6 @@ add_custom_command(OUTPUT LinphoneWrapper.swift
linphone-doc
)
if(NOT APPLE)
add_custom_command(OUTPUT linphonesw.framework
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/make-framework.sh" "linphonesw"
"-b" "${CMAKE_CURRENT_BINARY_DIR}"
"-v" "${PROJECT_VERSION}"
-o "${CMAKE_CURRENT_BINARY_DIR}"
DEPENDS linphonesw
)
add_custom_target(linphonesw-framework ALL
COMMAND echo "linphonesw.framework generated manually."
DEPENDS linphonesw.framework
)
endif()
add_library(linphonesw SHARED
${CMAKE_CURRENT_BINARY_DIR}/LinphoneWrapper.swift
)
......@@ -71,7 +56,7 @@ target_link_libraries(linphonesw
PRIVATE ${BCTOOLBOX_CORE_LIBRARIES} ${BELLESIP_LIBRARIES} linphone
)
if(APPLE)
if(CMAKE_GENERATOR STREQUAL Xcode)
set_target_properties(linphonesw PROPERTIES
FRAMEWORK TRUE
LINKER_LANGUAGE SWIFT
......@@ -87,6 +72,19 @@ if(APPLE)
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
else()
add_custom_command(OUTPUT linphonesw.framework
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/make-framework.sh" "linphonesw"
"-b" "${CMAKE_CURRENT_BINARY_DIR}"
"-v" "${PROJECT_VERSION}"
-o "${CMAKE_CURRENT_BINARY_DIR}"
DEPENDS linphonesw
)
add_custom_target(linphonesw-framework ALL
COMMAND echo "linphonesw.framework generated manually."
DEPENDS linphonesw.framework
)
#Add -target and -sdk options to switfc command line otherwise you'll get obscure errors.
target_compile_options(linphonesw PRIVATE -emit-objc-header -target ${CMAKE_OSX_ARCHITECTURES}-apple-ios10 -sdk ${CMAKE_OSX_SYSROOT})
......
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