From 9cddd4d0061cab9a8bf5ed8d63b639d629f5e67d Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 12 Jun 2021 22:17:26 -0700 Subject: [PATCH] CMake: Fix macOS version detection --- CMakeLists.txt | 2 +- src/platform/sdl/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 115fcd552..c1b987826 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -229,7 +229,7 @@ endif() if(APPLE) add_definitions(-D_DARWIN_C_SOURCE) list(APPEND OS_LIB "-framework Foundation") - if(CMAKE_SYSTEM_VERSION VERSION_GREATER "10.5.8") + if(NOT CMAKE_SYSTEM_VERSION VERSION_LESS "10.0") # Darwin 10.x is Mac OS X 10.6 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.6") endif() endif() diff --git a/src/platform/sdl/CMakeLists.txt b/src/platform/sdl/CMakeLists.txt index 8f5e394ed..107761d8c 100644 --- a/src/platform/sdl/CMakeLists.txt +++ b/src/platform/sdl/CMakeLists.txt @@ -49,7 +49,7 @@ if(WIN32) list(APPEND SDL_LIBRARY imm32 setupapi version winmm) elseif(APPLE) list(APPEND SDL_LIBRARY "-framework AppKit" "-framework AudioUnit" "-framework Carbon" "-framework CoreAudio" "-framework AudioToolbox" "-framework ForceFeedback" "-framework IOKit") - if(NOT CMAKE_SYSTEM_VERSION VERSION_LESS "10.13") + if(NOT CMAKE_SYSTEM_VERSION VERSION_LESS "17.0") # Darwin 17.x is macOS 10.13 list(APPEND SDL_LIBRARY "-framework Metal") endif() endif()