OS X: Do not try to set deployment target when cross-compiling
The change in commit v3.4.0-rc2~6^2 (Xcode: Adjust deployment target SDK version to host version, 2015-10-11) does not make sense when cross-compiling. Make it conditional to fix this regression in some cross-compiling cases. Closes: #16355
This commit is contained in:
parent
b99bbfe88d
commit
e8bafb6fcb
|
@ -90,7 +90,7 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET)
|
if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET ${_CURRENT_OSX_VERSION} CACHE STRING
|
set(CMAKE_OSX_DEPLOYMENT_TARGET ${_CURRENT_OSX_VERSION} CACHE STRING
|
||||||
"Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value." FORCE)
|
"Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value." FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue