Files
CMake/Modules/Internal/PlatformSelectionFile.cmake.in
Brad King f23636617a CMakePackageConfigHelpers: Move platform selection template to Internal/
The template added by commit 37bc3400cd (CMakePackageConfigHelpers: Add
generate_apple_platform_selection_file(), 2023-11-03) is a private
implementation detail.  Move it to `Modules/Internal/`.
2023-12-07 16:54:09 -05:00

25 lines
963 B
CMake

@PACKAGE_INIT@
string(TOLOWER "${CMAKE_OSX_SYSROOT}" _CMAKE_OSX_SYSROOT_LOWER)
if(_CMAKE_OSX_SYSROOT_LOWER MATCHES "(^|/)iphonesimulator")
@_branch_IOS_SIMULATOR_CONFIG_FILE@
elseif(_CMAKE_OSX_SYSROOT_LOWER MATCHES "(^|/)iphoneos")
@_branch_IOS_CONFIG_FILE@
elseif(_CMAKE_OSX_SYSROOT_LOWER MATCHES "(^|/)tvsimulator")
@_branch_TVOS_SIMULATOR_CONFIG_FILE@
elseif(_CMAKE_OSX_SYSROOT_LOWER MATCHES "(^|/)tvos")
@_branch_TVOS_CONFIG_FILE@
elseif(_CMAKE_OSX_SYSROOT_LOWER MATCHES "(^|/)watchsimulator")
@_branch_WATCHOS_SIMULATOR_CONFIG_FILE@
elseif(_CMAKE_OSX_SYSROOT_LOWER MATCHES "(^|/)watchos")
@_branch_WATCHOS_CONFIG_FILE@
elseif(_CMAKE_OSX_SYSROOT_LOWER MATCHES "(^|/)xrsimulator")
@_branch_VISIONOS_SIMULATOR_CONFIG_FILE@
elseif(_CMAKE_OSX_SYSROOT_LOWER MATCHES "(^|/)xros")
@_branch_VISIONOS_CONFIG_FILE@
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
@_branch_MACOS_CONFIG_FILE@
else()
message(FATAL_ERROR "Platform not supported")
endif()