Commit ff97f0c7 authored by DanmeiChen's avatar DanmeiChen

enable wrapper swift and jazzy doc

parent 11c6b92a
...@@ -84,7 +84,7 @@ job-ios-xcode: ...@@ -84,7 +84,7 @@ job-ios-xcode:
- mkdir -p build-ios - mkdir -p build-ios
- cd build-ios - cd build-ios
- echo $CMAKE_OPTIONS - echo $CMAKE_OPTIONS
- cmake .. -G Xcode -DLINPHONESDK_PLATFORM=IOS -DLINPHONESDK_IOS_ARCHS="arm64, armv7, x86_64" -DLINPHONESDK_IOS_BASE_URL=$IOS_SNAPSHOTS_URL $CMAKE_OPTIONS - cmake .. -G Xcode -DLINPHONESDK_PLATFORM=IOS -DLINPHONESDK_IOS_ARCHS="arm64, armv7, x86_64" -DLINPHONESDK_IOS_BASE_URL=$IOS_SNAPSHOTS_URL -DENABLE_SWIFT_WRAPPER=YES -DENABLE_UNIT_TESTS=YES $CMAKE_OPTIONS
- cmake --build . --target sdk -- -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=`sysctl -n hw.ncpu` - cmake --build . --target sdk -- -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=`sysctl -n hw.ncpu`
artifacts: artifacts:
......
...@@ -51,6 +51,14 @@ execute_process( ...@@ -51,6 +51,14 @@ execute_process(
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}" WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
) )
if(ENABLE_SWIFT_WRAPPER AND ENABLE_JAZZY_DOC)
message("generating jazzy doc for swift module ......")
execute_process(
COMMAND "jazzy" "--readme" "${LINPHONESDK_DIR}/linphone/wrappers/swift/README"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}/WORK/ios-${_first_arch}/Build/linphone/"
)
endif()
file(GLOB _frameworks "linphone-sdk/${_first_arch}-apple-darwin.ios/Frameworks/*.framework") file(GLOB _frameworks "linphone-sdk/${_first_arch}-apple-darwin.ios/Frameworks/*.framework")
foreach(_framework ${_frameworks}) foreach(_framework ${_frameworks})
get_filename_component(_framework_name "${_framework}" NAME_WE) get_filename_component(_framework_name "${_framework}" NAME_WE)
...@@ -58,6 +66,14 @@ foreach(_framework ${_frameworks}) ...@@ -58,6 +66,14 @@ foreach(_framework ${_frameworks})
foreach(_arch ${_archs}) foreach(_arch ${_archs})
list(APPEND _all_arch_frameworks "linphone-sdk/${_arch}-apple-darwin.ios/Frameworks/${_framework_name}.framework/${_framework_name}") list(APPEND _all_arch_frameworks "linphone-sdk/${_arch}-apple-darwin.ios/Frameworks/${_framework_name}.framework/${_framework_name}")
endforeach() endforeach()
if(_framework_name STREQUAL "linphonesw")
foreach(_arch ${_archs})
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "copy_directory" "linphone-sdk/${_arch}-apple-darwin.ios/Frameworks/linphonesw.framework/Modules/linphonesw.swiftmodule" "linphone-sdk/apple-darwin/Frameworks/linphonesw.framework/Modules/linphonesw.swiftmodule"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
)
endforeach()
endif()
string(REPLACE ";" " " _arch_string "${_archs}") string(REPLACE ";" " " _arch_string "${_archs}")
execute_process( execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "echo" "Mixing ${_framework_name} for archs [${_arch_string}]" COMMAND "${CMAKE_COMMAND}" "-E" "echo" "Mixing ${_framework_name} for archs [${_arch_string}]"
......
...@@ -97,7 +97,7 @@ endforeach() ...@@ -97,7 +97,7 @@ endforeach()
add_custom_target(lipo ALL add_custom_target(lipo ALL
"${CMAKE_COMMAND}" "-DLINPHONESDK_DIR=${LINPHONESDK_DIR}" "-DLINPHONESDK_BUILD_DIR=${CMAKE_BINARY_DIR}" "-DLINPHONESDK_IOS_ARCHS=${LINPHONESDK_IOS_ARCHS}" "-P" "${LINPHONESDK_DIR}/cmake/IOS/Lipo.cmake" "${CMAKE_COMMAND}" "-DLINPHONESDK_DIR=${LINPHONESDK_DIR}" "-DLINPHONESDK_BUILD_DIR=${CMAKE_BINARY_DIR}" "-DLINPHONESDK_IOS_ARCHS=${LINPHONESDK_IOS_ARCHS}" "-DENABLE_SWIFT_WRAPPER=${ENABLE_SWIFT_WRAPPER}" "-DENABLE_JAZZY_DOC=${ENABLE_JAZZY_DOC}" "-P" "${LINPHONESDK_DIR}/cmake/IOS/Lipo.cmake"
COMMENT "Aggregating frameworks of all architectures using lipo" COMMENT "Aggregating frameworks of all architectures using lipo"
DEPENDS ${_ios_build_targets} DEPENDS ${_ios_build_targets}
) )
......
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