@@ -16,7 +16,13 @@ message(STATUS "gcc found at: ${CMAKE_C_COMPILER}")
16
16
message (STATUS "g++ found at: ${CMAKE_CXX_COMPILER} " )
17
17
message (STATUS "Using iOS SDK: ${CMAKE_OSX_SYSROOT} " )
18
18
19
- set (CMAKE_OSX_SYSROOT "iphoneos;iphonesimulator" )
19
+ set (CMAKE_SYSTEM_NAME "iOS" )
20
+ # In order to build for both device and simulator, this needs to be empty,
21
+ # or the CMAKE_OSX_DEPLOYMENT_TARGET setting below is not handled correctly.
22
+ # Note, this seems to cause an issue with repeating builds on some cmake versions,
23
+ # the long term fix will likely be to not handle both device and simulator with
24
+ # the same toolchain, and instead merge the libraries after the fact.
25
+ set (CMAKE_OSX_SYSROOT "" )
20
26
set (CMAKE_OSX_ARCHITECTURES "arm64;armv7;x86_64;i386" CACHE STRING "" )
21
27
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator" )
22
28
set (IOS_PLATFORM_LOCATION "iPhoneOS.platform;iPhoneSimulator.platform" )
@@ -25,6 +31,7 @@ set(CMAKE_IOS_INSTALL_UNIVERSAL_LIBS "YES")
25
31
set (CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO" )
26
32
set (CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO" )
27
33
set (CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES" )
34
+ set (CMAKE_OSX_DEPLOYMENT_TARGET "8.0" CACHE STRING "" )
28
35
29
36
# skip TRY_COMPILE checks
30
37
set (CMAKE_CXX_COMPILER_WORKS TRUE )
0 commit comments