From f6408a058050ebb8d64eaae3fa5fbd68389dd7f3 Mon Sep 17 00:00:00 2001 From: "cr.zoidberg" Date: Fri, 2 Oct 2020 00:14:04 +0300 Subject: [PATCH] workaround for new XCode 12 policy for simulator builds --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 05c640027..d6b61e72f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,6 +189,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS") set(Boost_LIBRARY_DIRS "/Users/roky/projects/Zano/mobile_repo/ofxiOSBoost/libs/boost/ios/") set(Boost_LIBRARIES "libboost.a") set(Boost_VERSION "ofxiOSBoost 1.60.0") + #workaround for new XCode 12 policy for builds(now it includes a slice for the "arm64" when builds for simulator) + set(__iphoneos_archs "armv7 armv7s arm64") + set(__iphonesimulator_archs "i386 x86_64") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "${__iphoneos_archs}") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "${__iphoneos_archs}") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "${__iphonesimulator_archs}") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "${__iphonesimulator_archs}") elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") set(Boost_INCLUDE_DIRS "/Users/roky/projects/Zano/mobile_repo/Boost-for-Android-Prebuilt/1.69.0/include") set(Boost_LIBRARY_DIRS "/Users/roky/projects/Zano/mobile_repo/Boost-for-Android-Prebuilt/1.69.0/libs/llvm/${CMAKE_ANDROID_ARCH_ABI}/")