mirror of https://github.com/mgba-emu/mgba.git
CMake: Default macOS SDK version to OS version if not found
This commit is contained in:
parent
0670687b86
commit
56b59c767b
|
@ -236,6 +236,10 @@ endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
execute_process(COMMAND xcrun --show-sdk-version OUTPUT_VARIABLE MACOSX_SDK)
|
execute_process(COMMAND xcrun --show-sdk-version OUTPUT_VARIABLE MACOSX_SDK)
|
||||||
|
if(NOT MACOSX_SDK)
|
||||||
|
message(WARNING "Could not detect SDK version; defaulting to system version. Is SDKROOT set?")
|
||||||
|
set(MACOSX_SDK ${CMAKE_SYSTEM_VERSION})
|
||||||
|
endif()
|
||||||
add_definitions(-D_DARWIN_C_SOURCE)
|
add_definitions(-D_DARWIN_C_SOURCE)
|
||||||
list(APPEND OS_LIB "-framework Foundation")
|
list(APPEND OS_LIB "-framework Foundation")
|
||||||
if(NOT CMAKE_SYSTEM_VERSION VERSION_LESS "10.0") # Darwin 10.x is Mac OS X 10.6
|
if(NOT CMAKE_SYSTEM_VERSION VERSION_LESS "10.0") # Darwin 10.x is Mac OS X 10.6
|
||||||
|
|
Loading…
Reference in New Issue