--- Modules/Platform/Darwin.cmake.orig
+++ Modules/Platform/Darwin.cmake
@@ -70,7 +70,8 @@
     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 "/")
+  elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/" OR
+         "${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "")
     set(_sdk_ver "${_CURRENT_OSX_VERSION}")
   else()
     message(FATAL_ERROR
