mirror of https://github.com/mgba-emu/mgba.git
CMake: Fix macOS version detection
This commit is contained in:
parent
b97f97159d
commit
9cddd4d006
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue