mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 11:22:21 -06:00
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>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user