summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-08-05 13:54:04 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-08-05 13:54:04 (GMT)
commit1768014dfc8aee30430d57c8f984aad0abb15094 (patch)
tree85aba9777b73f77cda1d5e9b34927d73b4179e5c /Modules
parentc3592649485ad9eacfefbc555583fc05b8a52b09 (diff)
parentbf5a5bc8b4788a236a53037c2f8a03904edf6079 (diff)
downloadCMake-1768014dfc8aee30430d57c8f984aad0abb15094.zip
CMake-1768014dfc8aee30430d57c8f984aad0abb15094.tar.gz
CMake-1768014dfc8aee30430d57c8f984aad0abb15094.tar.bz2
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)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Darwin.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index f0652b9..865cc8e 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -132,7 +132,11 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode
# specially named SDKs.
set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.4 "u")
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
"${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
else()