diff options
author | Brad King <brad.king@kitware.com> | 2016-11-02 12:44:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-11-02 12:44:16 (GMT) |
commit | 503766fa0e3ce87b60d4b55ff044c58242816873 (patch) | |
tree | 29259b82ab5ca4e8abd09ad3e8bd94f89164f840 /Modules/Platform/Darwin-Initialize.cmake | |
parent | 77413bc5db8884f36fe7c6e162507ca5a0fa8fee (diff) | |
parent | 935041908db878163ab03f175b992981fc4b8ff3 (diff) | |
download | CMake-503766fa0e3ce87b60d4b55ff044c58242816873.zip CMake-503766fa0e3ce87b60d4b55ff044c58242816873.tar.gz CMake-503766fa0e3ce87b60d4b55ff044c58242816873.tar.bz2 |
Merge branch 'fix-macos-sysroot' into release
Diffstat (limited to 'Modules/Platform/Darwin-Initialize.cmake')
-rw-r--r-- | Modules/Platform/Darwin-Initialize.cmake | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake index 39374e1..b539e45 100644 --- a/Modules/Platform/Darwin-Initialize.cmake +++ b/Modules/Platform/Darwin-Initialize.cmake @@ -113,7 +113,6 @@ set(CMAKE_OSX_SYSROOT "${_CMAKE_OSX_SYSROOT_DEFAULT}" CACHE ${_CMAKE_OSX_SYSROOT "The product will be built against the headers and libraries located inside the indicated SDK.") # Transform the cached value to something we can use. -set(_CMAKE_OSX_SYSROOT_ORIG "${CMAKE_OSX_SYSROOT}") set(_CMAKE_OSX_SYSROOT_PATH "") if(CMAKE_OSX_SYSROOT) if("x${CMAKE_OSX_SYSROOT}" MATCHES "/") @@ -122,13 +121,10 @@ if(CMAKE_OSX_SYSROOT) message(WARNING "Ignoring CMAKE_OSX_SYSROOT value:\n ${CMAKE_OSX_SYSROOT}\n" "because the directory does not exist.") set(CMAKE_OSX_SYSROOT "") - set(_CMAKE_OSX_SYSROOT_ORIG "") endif() set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") - endif() - - if(CMAKE_OSX_SYSROOT) - # Transform the (maybe unversioned) sysroot into a versioned path. + else() + # Transform the sdk name into a path. execute_process( COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path OUTPUT_VARIABLE _stdout |