Merge topic 'osx-find-sdk-for-deployment-target'
bf5a5bc
bootstrap: Do not suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot (#14324)95f78e0
OS X: Search for SDK based on deployment target (#14324)
This commit is contained in:
commit
1768014dfc
|
@ -132,7 +132,11 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode
|
||||||
# specially named SDKs.
|
# specially named SDKs.
|
||||||
set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.4 "u")
|
set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.4 "u")
|
||||||
set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.3 ".9")
|
set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.3 ".9")
|
||||||
set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
|
if(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
|
set(_CMAKE_OSX_SDKS_VER ${CMAKE_OSX_DEPLOYMENT_TARGET}${_CMAKE_OSX_SDKS_VER_SUFFIX_${CMAKE_OSX_DEPLOYMENT_TARGET}})
|
||||||
|
else()
|
||||||
|
set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
|
||||||
|
endif()
|
||||||
set(_CMAKE_OSX_SYSROOT_DEFAULT
|
set(_CMAKE_OSX_SYSROOT_DEFAULT
|
||||||
"${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
|
"${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -1525,14 +1525,6 @@ set (CMAKE_MAN_DIR "'"${cmake_man_dir}"'" CACHE PATH "Install location for man p
|
||||||
set (CMAKE_DATA_DIR "'"${cmake_data_dir}"'" CACHE PATH "Install location for data (relative to prefix)." FORCE)
|
set (CMAKE_DATA_DIR "'"${cmake_data_dir}"'" CACHE PATH "Install location for data (relative to prefix)." FORCE)
|
||||||
' > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
|
' > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
|
||||||
|
|
||||||
# Suppress -isysroot if user-provided flags already have it.
|
|
||||||
if echo "${cmake_c_flags}" | grep isysroot >/dev/null 2>&1 &&
|
|
||||||
echo "${cmake_cxx_flags}" | grep isysroot >/dev/null 2>&1; then
|
|
||||||
echo '
|
|
||||||
set(CMAKE_OSX_SYSROOT "" CACHE PATH "" FORCE)
|
|
||||||
' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add configuration settings given as command-line options.
|
# Add configuration settings given as command-line options.
|
||||||
if [ "x${cmake_bootstrap_qt_gui}" != "x" ]; then
|
if [ "x${cmake_bootstrap_qt_gui}" != "x" ]; then
|
||||||
echo '
|
echo '
|
||||||
|
|
Loading…
Reference in New Issue