mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
Xcode: Link matching zlib for iOS Simulator SDK
The XcodeRemoveExcessiveISystem test runs `find_package(ZLIB)` which returns an SDK-relative path to `zlib.tlb`. When the test switches the SDK for building to something different than the SDK used for configuration the linker rightfully complains about the mismatch. The fix is to configure and build with the same SDK.
This commit is contained in:
@@ -310,10 +310,10 @@ endif()
|
||||
if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
|
||||
function(XcodeRemoveExcessiveISystemSDK SDK)
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeRemoveExcessiveISystemSDK-${SDK}-build)
|
||||
set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS")
|
||||
set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_OSX_SYSROOT=${SDK}")
|
||||
run_cmake(XcodeRemoveExcessiveISystem)
|
||||
set(RunCMake_TEST_NO_CLEAN 1)
|
||||
run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build . -- -sdk ${SDK})
|
||||
run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build .)
|
||||
endfunction()
|
||||
|
||||
XcodeRemoveExcessiveISystemSDK(iphoneos)
|
||||
|
||||
Reference in New Issue
Block a user