From 5b4faeefe36fd775fd60f98aedf0cc35202f99f4 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 19 Jul 2014 20:43:20 -0700 Subject: [PATCH] OS X: Allow deployment target with "/" sysroot (#15040) Allow the combination -DCMAKE_OSX_DEPLOYMENT_TARGET="10.8" -DCMAKE_OSX_SYSROOT="/" to work. Treat the "/" sysroot as targeting the current OS X version. --- Modules/Platform/Darwin.cmake | 2 ++ 1 file changed, 2 insertions(+) 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}' "