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)
This commit is contained in:
Daniel Patterson 2016-10-27 16:29:27 -06:00
parent 59c60f7c54
commit fbeacde0d5

View File

@ -249,6 +249,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)