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.
This commit is contained in:
parent
a971de3adf
commit
5b4faeefe3
|
@ -70,6 +70,8 @@ if(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
set(_sdk_ver "${CMAKE_MATCH_1}")
|
set(_sdk_ver "${CMAKE_MATCH_1}")
|
||||||
elseif("${_CMAKE_OSX_SYSROOT_ORIG}" MATCHES "^macosx([0-9]+\\.[0-9]+)$")
|
elseif("${_CMAKE_OSX_SYSROOT_ORIG}" MATCHES "^macosx([0-9]+\\.[0-9]+)$")
|
||||||
set(_sdk_ver "${CMAKE_MATCH_1}")
|
set(_sdk_ver "${CMAKE_MATCH_1}")
|
||||||
|
elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/")
|
||||||
|
set(_sdk_ver "${_CURRENT_OSX_VERSION}")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
"CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
|
"CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
|
||||||
|
|
Loading…
Reference in New Issue