diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index e25df1e6f..e5c5f36d2 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -70,6 +70,8 @@ if(CMAKE_OSX_DEPLOYMENT_TARGET) set(_sdk_ver "${CMAKE_MATCH_1}") elseif("${_CMAKE_OSX_SYSROOT_ORIG}" MATCHES "^macosx([0-9]+\\.[0-9]+)$") set(_sdk_ver "${CMAKE_MATCH_1}") + elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/") + set(_sdk_ver "${_CURRENT_OSX_VERSION}") else() message(FATAL_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "