Add workaround for missing macOS 10.9 SDK

This commit is contained in:
Marvin Scholz 2020-01-11 01:49:42 +01:00 committed by Ethan Lee
parent 51b2420181
commit eb7920ec47
1 changed files with 7 additions and 1 deletions

View File

@ -7,7 +7,13 @@ PROJECT(VVVVVV)
# Architecture Flags
IF(APPLE)
# Wow, Apple is a huge jerk these days huh?
SET(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
SET(OSX_10_9_SDK_PATH /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
IF(IS_DIRECTORY ${OSX_10_9_SDK_PATH})
SET(CMAKE_OSX_SYSROOT ${OSX_10_9_SDK_PATH})
ELSE()
MESSAGE(WARNING "macOS 10.9 SDK not found, expect badness!")
ENDIF()
MESSAGE(STATUS "Using macOS SDK at ${CMAKE_OSX_SYSROOT}")
SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)
LINK_DIRECTORIES(/usr/local/lib)
ADD_COMPILE_OPTIONS(-Werror=partial-availability)