Skip to content

Commit

Permalink
Merge pull request #189 from YudrB/ARM64_WATCHOS
Browse files Browse the repository at this point in the history
Added SIMULATORARM64_WATCHOS platform option
  • Loading branch information
leetal authored Nov 16, 2023
2 parents efd462a + 6134e1d commit 186355a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ios.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
# WATCHOS = Build for armv7k arm64_32 for watchOS.
# WATCHOSCOMBINED = Build for armv7k arm64_32 x86_64 watchOS + watchOS Simulator. Combined into FAT STATIC lib (only supported on 3.14+ of CMake with "-G Xcode" argument in combination with the "cmake --install" CMake build step)
# SIMULATOR_WATCHOS = Build for x86_64 for watchOS Simulator.
# SIMULATORARM64_WATCHOS = Build for arm64 for watchOS Simulator.
# MAC = Build for x86_64 macOS.
# MAC_ARM64 = Build for Apple Silicon macOS.
# MAC_UNIVERSAL = Combined build for x86_64 and Apple Silicon on macOS.
Expand Down Expand Up @@ -113,6 +114,7 @@
# SIMULATORARM64_TVOS = arm64
# WATCHOS = armv7k arm64_32 (if applicable)
# SIMULATOR_WATCHOS = x86_64 (i386 has since long been deprecated)
# SIMULATORARM64_WATCHOS = arm64
# MAC = x86_64
# MAC_ARM64 = arm64
# MAC_UNIVERSAL = x86_64 arm64
Expand Down Expand Up @@ -158,7 +160,7 @@ set(ENV{_IOS_TOOLCHAIN_HAS_RUN} true)
list(APPEND _supported_platforms
"OS" "OS64" "OS64COMBINED" "SIMULATOR" "SIMULATOR64" "SIMULATORARM64" "SIMULATOR64COMBINED"
"TVOS" "TVOSCOMBINED" "SIMULATOR_TVOS" "SIMULATORARM64_TVOS"
"WATCHOS" "WATCHOSCOMBINED" "SIMULATOR_WATCHOS"
"WATCHOS" "WATCHOSCOMBINED" "SIMULATOR_WATCHOS" "SIMULATORARM64_WATCHOS"
"MAC" "MAC_ARM64" "MAC_UNIVERSAL"
"VISIONOS" "SIMULATOR_VISIONOS" "SIMULATOR64_VISIONOS"
"MAC_CATALYST" "MAC_CATALYST_ARM64")
Expand Down Expand Up @@ -481,6 +483,14 @@ elseif(PLATFORM_INT STREQUAL "SIMULATOR_WATCHOS")
else()
set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET}-simulator)
endif()
elseif(PLATFORM_INT STREQUAL "SIMULATORARM64_WATCHOS")
set(SDK_NAME watchsimulator)
if(NOT ARCHS)
set(ARCHS arm64)
set(APPLE_TARGET_TRIPLE_INT arm64-apple-watchos${DEPLOYMENT_TARGET}-simulator)
else()
set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET}-simulator)
endif()
elseif(PLATFORM_INT STREQUAL "SIMULATOR64_VISIONOS")
set(SDK_NAME xrsimulator)
if(NOT ARCHS)
Expand Down Expand Up @@ -816,6 +826,9 @@ elseif(PLATFORM_INT STREQUAL "SIMULATORARM64_TVOS")
elseif(PLATFORM_INT STREQUAL "SIMULATOR_WATCHOS")
set(SDK_NAME_VERSION_FLAGS
"-mwatchos-simulator-version-min=${DEPLOYMENT_TARGET}")
elseif(PLATFORM_INT STREQUAL "SIMULATORARM64_WATCHOS")
set(SDK_NAME_VERSION_FLAGS
"-mwatchos-simulator-version-min=${DEPLOYMENT_TARGET}")
elseif(PLATFORM_INT STREQUAL "MAC")
set(SDK_NAME_VERSION_FLAGS
"-mmacosx-version-min=${DEPLOYMENT_TARGET}")
Expand Down

0 comments on commit 186355a

Please sign in to comment.