diff --git a/CMake/iOS.cmake b/CMake/iOS.cmake index bb2a1295d..b13fbce77 100644 --- a/CMake/iOS.cmake +++ b/CMake/iOS.cmake @@ -114,6 +114,23 @@ elseif (IOS_PLATFORM STREQUAL "TVSIMULATOR") set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-tvsimulator") set (APPLE_TV True) +elseif (IOS_PLATFORM STREQUAL "XROS") + set (IOS_PLATFORM_LOCATION "XROS.platform") + set (XCODE_IOS_PLATFORM xros) + + # This causes the installers to properly locate the output libraries + set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-xros") + + set (APPLE_VISION True) +elseif (IOS_PLATFORM STREQUAL "XRSIMULATOR") + set (SIMULATOR_FLAG true) + set (IOS_PLATFORM_LOCATION "XRSimulator.platform") + set (XCODE_IOS_PLATFORM xros-simulator) + + # This causes the installers to properly locate the output libraries + set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-xrsimulator") + + set (APPLE_VISION True) else (IOS_PLATFORM STREQUAL "OS") message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. Please choose OS, SIMULATOR, or WATCHOS.") endif () @@ -212,6 +229,10 @@ if (NOT DEFINED IOS_ARCH) set (IOS_ARCH "arm64") elseif (IOS_PLATFORM STREQUAL "TVSIMULATOR") set (IOS_ARCH "x86_64;arm64") + elseif (IOS_PLATFORM STREQUAL "XROS") + set (IOS_ARCH "arm64") + elseif (IOS_PLATFORM STREQUAL "XRSIMULATOR") + set (IOS_ARCH "x86_64;arm64") endif() endif() message (STATUS "The iOS architectures: ${IOS_ARCH}") diff --git a/example/ios/build.sh b/example/ios/build.sh index cd11907b2..e5ba194f4 100755 --- a/example/ios/build.sh +++ b/example/ios/build.sh @@ -21,7 +21,7 @@ set_cmake_options () { options="$options -DCMAKE_BUILD_TYPE=Release" } -platforms="macOS iOS watchOS tvOS" +platforms="macOS iOS watchOS tvOS xrOS" #platforms="watchOS" for platform in $platforms; do @@ -41,6 +41,8 @@ do ios_platform="WATCH" elif [[ $platform = "tvOS" ]]; then ios_platform="TV" + elif [[ $platform = "xrOS" ]]; then + ios_platform="XR" else ios_platform="" fi