From b83808c737f70aeb41a5ce3ddee5fc6fc49fc0f0 Mon Sep 17 00:00:00 2001 From: Danmei Chen <danmei.chen@belledonne-communications.com> Date: Thu, 30 Sep 2021 13:06:39 +0200 Subject: [PATCH] fix swift file is attached to multiple targets --- wrappers/swift/CMakeLists.txt | 6 ++++++ wrappers/swift/JazzyDoc.cmake | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/wrappers/swift/CMakeLists.txt b/wrappers/swift/CMakeLists.txt index 00b612ec57..0afd8a63ab 100644 --- a/wrappers/swift/CMakeLists.txt +++ b/wrappers/swift/CMakeLists.txt @@ -73,6 +73,12 @@ if (ENABLE_JAZZY_DOC OR ENABLE_SWIFT_WRAPPER_COMPILATION) PRIVATE ${BCTOOLBOX_CORE_LIBRARIES} ${BELLESIP_LIBRARIES} linphone ) + if (NOT ENABLE_SWIFT_WRAPPER_COMPILATION) + # LinphoneWrapper.swift is attached to multiple targets: linphonesw linphoneswsource + # but none of these is a common dependency of the other(s). This is not + # allowed by the Xcode "new build system". + add_dependencies(linphonesw linphoneswsource) + endif() if(CMAKE_GENERATOR STREQUAL Xcode) set_target_properties(linphonesw PROPERTIES FRAMEWORK TRUE diff --git a/wrappers/swift/JazzyDoc.cmake b/wrappers/swift/JazzyDoc.cmake index f33c44f0cd..14dd5554a9 100644 --- a/wrappers/swift/JazzyDoc.cmake +++ b/wrappers/swift/JazzyDoc.cmake @@ -7,7 +7,7 @@ if(ENABLE_SWIFT_WRAPPER AND ENABLE_JAZZY_DOC) message("Generating jazzy doc for swift module, we need archs x86_64 to generate jazzy doc!") execute_process( - COMMAND "jazzy" "-x" "-project,linphone.xcodeproj,-scheme,linphonesw" "--readme" "README" + COMMAND "jazzy" "-x" "-project,linphone.xcodeproj,-scheme,linphonesw" "--readme" "wrappers/swift/README" WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}/WORK/ios-x86_64/Build/linphone/" ) execute_process( -- GitLab