build tdlib for xros/visionos

This commit is contained in:
Vincent Neo 2023-07-26 01:38:59 +08:00 committed by Aliaksei Levin
parent d57fdc5155
commit 874796ef24
2 changed files with 24 additions and 1 deletions

View File

@ -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}")

View File

@ -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