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:
Brad King 2013-08-05 09:54:04 -04:00 committed by CMake Topic Stage
commit 1768014dfc
2 changed files with 5 additions and 9 deletions

View File

@ -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()

View File

@ -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 '