Skip to content

CMAKE_OSX_DEPLOYMENT_TARGET should define IPHONEOS_DEPLOYMENT_TARGET for iOS

When cross-compiling for iOS (or ios-simulator) we can use CMAKE_OSX_SYSROOT to select the proper SDK [1][2], and CMAKE_OSX_ARCHITECTURES to define the proper architecture [3][4], but setting the deployment target with CMAKE_OSX_DEPLOYMENT_TARGET will fail as it will set the flag -mmacosx-version-min instead of -miphoneos-version-min for ios, and -mios-simulator-version-min for simulators (should set the proper flag based on the sdk type defined by CMAKE_OSX_SYSROOT)

  1. /usr/bin/xcrun -sdk iphoneos --show-sdk-path
  2. /usr/bin/xcrun -sdk iphonesimulator --show-sdk-path
  3. ios: arm64;armv7
  4. simulator: i386;x86_64

It seems to be defining MACOSX_DEPLOYMENT_TARGET instead of IPHONEOS_DEPLOYMENT_TARGET: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information