diff options
author | Brad King <brad.king@kitware.com> | 2012-09-21 18:35:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-09-21 18:45:54 (GMT) |
commit | 43b74793de80153b9446689adf79c4acf1391969 (patch) | |
tree | bd40fecf145d8590176c99fae3a80884285d84cd /Modules | |
parent | 2690738458725f2c52afccd99ee744a9b92e30ed (diff) | |
download | CMake-43b74793de80153b9446689adf79c4acf1391969.zip CMake-43b74793de80153b9446689adf79c4acf1391969.tar.gz CMake-43b74793de80153b9446689adf79c4acf1391969.tar.bz2 |
OS X: Further improve default CMAKE_OSX_SYSROOT selection
Since commit 230ea218 (OS X: Improve default CMAKE_OSX_SYSROOT
selection, 2012-09-21) we always set CMAKE_OSX_SYSROOT if any SDK is
found in order to support Makefile generator builds with Xcode >= 4.3
without the command-line tools installed. However, in the basic
POSIX-only case of the Makefile generator with command-line tools and no
CMAKE_OSX_ARCHITECTURES we should not select any SDK by default.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/Darwin.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index 90d34ca..46ea310 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -106,7 +106,9 @@ elseif(NOT "x$ENV{SDKROOT}" STREQUAL "x" AND (NOT "x$ENV{SDKROOT}" MATCHES "/" OR IS_DIRECTORY "$ENV{SDKROOT}")) # Use the value of SDKROOT from the environment. set(_CMAKE_OSX_SYSROOT_DEFAULT "$ENV{SDKROOT}") -else() +elseif("${CMAKE_GENERATOR}" MATCHES Xcode + 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. set(_CMAKE_OSX_SDKS_DIR "") if(OSX_DEVELOPER_ROOT) |