Checking macOS SDK version with Xcode generator on CMake 4.0?

It seems that when using the Xcode generator with CMake 4.0, CMAKE_OSX_SYSROOT is no longer set at any point in the configuration/generation process by default. Previously, we would use the value of this variable to verify that the user was building on an SDK version supported by the project.

What is the intended way of checking the user’s SDK version when using Xcode? My desired outcome is to exit configuration with a fatal error if the SDK version is not supported.

I know I could just use xcrun -sdk macos --show-sdk-path to fill our own SDK variable, which is what CMake seems to do internally when setting CMAKE_OSX_SYSROOT for other generators, just not Xcode any longer. But I’d just like to check against what the intended idea is here.