From da77edfc83bdee97050038be462f7cccc4819b45 Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Thu, 27 Oct 2016 16:29:27 -0600 Subject: [PATCH] Explicitly set minimum OSX version, and detect SDK path. This fixes situations where XCode is installed with a newer SDK than the current OS. (#3198) --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ceacf6001..43279afa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -264,6 +264,8 @@ endif() # Configuring other platform dependencies if(APPLE) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10") + execute_process(COMMAND xcrun --sdk macosx --show-sdk-path OUTPUT_VARIABLE CMAKE_OSX_SYSROOT OUTPUT_STRIP_TRAILING_WHITESPACE) set(CMAKE_OSX_ARCHITECTURES "x86_64") message(STATUS "Set Architecture to x64 on OS X") exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION)