summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-11-05 15:43:46 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-05 15:47:33 (GMT)
commit15f5764e2ca9cd10fca7f5bb44f631c7c449352e (patch)
tree417a32b0f94916ae804d263743761b9ca1ca0d68 /Modules/Platform
parentdf928646bae077d0b827116f93a64062e8bd1731 (diff)
downloadCMake-15f5764e2ca9cd10fca7f5bb44f631c7c449352e.zip
CMake-15f5764e2ca9cd10fca7f5bb44f631c7c449352e.tar.gz
CMake-15f5764e2ca9cd10fca7f5bb44f631c7c449352e.tar.bz2
OS X: Fix default CMAKE_OSX_SYSROOT with deployment target
Since commit 43b74793 (OS X: Further improve default CMAKE_OSX_SYSROOT selection, 2012-09-21) we choose a default CMAKE_OSX_SYSROOT only when one is needed. However, the change forgot that we require a sysroot when a deployment target is requested. Teach Darwin.cmake to choose a default CMAKE_OSX_SYSROOT when CMAKE_OSX_DEPLOYMENT_TARGET is set. Reported-by: Matthew Brett <matthew.brett@gmail.com> Reported-by: Bradley Giesbrecht <pixilla@macports.org>
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Darwin.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index a401762..4e7e99c 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -107,6 +107,7 @@ elseif(NOT "x$ENV{SDKROOT}" STREQUAL "x" AND
# Use the value of SDKROOT from the environment.
set(_CMAKE_OSX_SYSROOT_DEFAULT "$ENV{SDKROOT}")
elseif("${CMAKE_GENERATOR}" MATCHES Xcode
+ OR CMAKE_OSX_DEPLOYMENT_TARGET
OR CMAKE_OSX_ARCHITECTURES MATCHES "[^;]"
OR NOT EXISTS "/usr/include/sys/types.h")
# Find installed SDKs in either Xcode-4.3+ or pre-4.3 SDKs directory.