summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/Platform/Darwin-Initialize.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake
index 91c2cf3..427909d 100644
--- a/Modules/Platform/Darwin-Initialize.cmake
+++ b/Modules/Platform/Darwin-Initialize.cmake
@@ -125,8 +125,10 @@ if(CMAKE_OSX_SYSROOT)
set(_CMAKE_OSX_SYSROOT_ORIG "")
endif()
set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}")
- else()
- # Transform the sdk name into a path.
+ endif()
+
+ if(CMAKE_OSX_SYSROOT)
+ # Transform the (maybe unversioned) sysroot into a versioned path.
execute_process(
COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path
OUTPUT_VARIABLE _stdout