From e7e7323ff01684262c9ea9fd09913f558dace2e0 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 24 Feb 2015 15:00:41 -0800 Subject: [PATCH] pass 10.9 SDK as CMAKE_OSX_SYSROOT --- CMakeLists.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc67d622de..5deecb4be5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,8 +88,17 @@ endif () set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${QT_CMAKE_PREFIX_PATH}) -# set our OS X deployment target to -set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8) +if (APPLE) + # set our OS X deployment target + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8) + + # find the 10.9 SDK path + execute_process(COMMAND xcodebuild -sdk -version OUTPUT_VARIABLE XCODE_SDK_VERSIONS) + string(REGEX MATCH \\/.+MacOSX10.9.sdk OSX_SDK_PATH ${XCODE_SDK_VERSIONS}) + + # set that as the SDK to use + set(CMAKE_OSX_SYSROOT ${OSX_SDK_PATH}) +endif () # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON)