Tests/RunCMake/XcFramework: Use macosx SDK in all multi-arch macOS cases
We select the list of macOS architectures based on the version of Xcode. Therefore we should use a macosx SDK that comes with Xcode to make sure it has all the selected architectures. For example, on macOS 10.15 the system `/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk` SDK may have only `x86_64`, but Xcode 12 can be installed with SDKs that support both `arm64` and `x86_64`.
This commit is contained in:
parent
70ff1f15fc
commit
7fb14e707d
@ -104,17 +104,17 @@ create_xcframework(framework framework "${xcframework_platforms}")
|
||||
create_xcframework(incomplete framework "tvos;watchos")
|
||||
create_executables(library library)
|
||||
create_executables(framework framework)
|
||||
run_cmake_with_options(create-executable-incomplete -DCMAKE_SYSTEM_NAME=Darwin "-DCMAKE_OSX_ARCHITECTURES=${macos_archs_1}" -DMYLIB_LIBRARY=${RunCMake_BINARY_DIR}/create-xcframework-incomplete-build/mylib.xcframework)
|
||||
run_cmake_with_options(create-executable-incomplete -DCMAKE_SYSTEM_NAME=Darwin "-DCMAKE_OSX_ARCHITECTURES=${macos_archs_1}" -DCMAKE_OSX_SYSROOT=macosx -DMYLIB_LIBRARY=${RunCMake_BINARY_DIR}/create-xcframework-incomplete-build/mylib.xcframework)
|
||||
create_executables(target-library library)
|
||||
create_executables(target-framework framework)
|
||||
run_cmake_with_options(create-executable-target-incomplete -DCMAKE_SYSTEM_NAME=Darwin "-DCMAKE_OSX_ARCHITECTURES=${macos_archs_1}" -DMYLIB_LIBRARY=${RunCMake_BINARY_DIR}/create-xcframework-incomplete-build/mylib.xcframework)
|
||||
run_cmake_with_options(create-executable-target-incomplete -DCMAKE_SYSTEM_NAME=Darwin "-DCMAKE_OSX_ARCHITECTURES=${macos_archs_1}" -DCMAKE_OSX_SYSROOT=macosx -DMYLIB_LIBRARY=${RunCMake_BINARY_DIR}/create-xcframework-incomplete-build/mylib.xcframework)
|
||||
if(RunCMake_GENERATOR STREQUAL "Xcode" AND CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 12)
|
||||
create_executables(library-link-phase library)
|
||||
create_executables(framework-link-phase framework)
|
||||
run_cmake_with_options(create-executable-incomplete-link-phase -DCMAKE_SYSTEM_NAME=Darwin "-DCMAKE_OSX_ARCHITECTURES=${macos_archs_1}" -DMYLIB_LIBRARY=${RunCMake_BINARY_DIR}/create-xcframework-incomplete-build/mylib.xcframework)
|
||||
run_cmake_with_options(create-executable-incomplete-link-phase -DCMAKE_SYSTEM_NAME=Darwin "-DCMAKE_OSX_ARCHITECTURES=${macos_archs_1}" -DCMAKE_OSX_SYSROOT=macosx -DMYLIB_LIBRARY=${RunCMake_BINARY_DIR}/create-xcframework-incomplete-build/mylib.xcframework)
|
||||
create_executables(target-library-link-phase library)
|
||||
create_executables(target-framework-link-phase framework)
|
||||
run_cmake_with_options(create-executable-target-incomplete-link-phase -DCMAKE_SYSTEM_NAME=Darwin "-DCMAKE_OSX_ARCHITECTURES=${macos_archs_1}" -DMYLIB_LIBRARY=${RunCMake_BINARY_DIR}/create-xcframework-incomplete-build/mylib.xcframework)
|
||||
run_cmake_with_options(create-executable-target-incomplete-link-phase -DCMAKE_SYSTEM_NAME=Darwin "-DCMAKE_OSX_ARCHITECTURES=${macos_archs_1}" -DCMAKE_OSX_SYSROOT=macosx -DMYLIB_LIBRARY=${RunCMake_BINARY_DIR}/create-xcframework-incomplete-build/mylib.xcframework)
|
||||
endif()
|
||||
|
||||
# Ensure that .xcframework is found before .framework
|
||||
|
Loading…
Reference in New Issue
Block a user