summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2016-10-16 20:56:36 +0200
committerBrad King <brad.king@kitware.com>2016-10-17 10:02:17 -0400
commite8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090 (patch)
treef32ddffe7ba60630b98eae6d3bd5cef85f2a7609
parentb99bbfe88d1bb02dc903507f3e1bbe716ac04c12 (diff)
downloadcmake-e8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090.tar.gz
OS X: Do not try to set deployment target when cross-compiling
The change in commit v3.4.0-rc2~6^2 (Xcode: Adjust deployment target SDK version to host version, 2015-10-11) does not make sense when cross-compiling. Make it conditional to fix this regression in some cross-compiling cases. Closes: #16355
-rw-r--r--Modules/Platform/Darwin-Initialize.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake
index 427909d6c5..39374e154a 100644
--- a/Modules/Platform/Darwin-Initialize.cmake
+++ b/Modules/Platform/Darwin-Initialize.cmake
@@ -90,7 +90,7 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode
endif()
endforeach()
- if(NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET)
+ if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET)
set(CMAKE_OSX_DEPLOYMENT_TARGET ${_CURRENT_OSX_VERSION} CACHE STRING
"Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value." FORCE)
endif()