CMake: Bump minimum macOS to 10.7 when building against SDL2

This commit is contained in:
Vicki Pfau 2023-12-10 21:15:03 -08:00
parent dc9a2572d1
commit a874450c1a
2 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,9 @@ if(BUILD_SDL)
add_definitions(-DBUILD_SDL)
if(SDL2_FOUND)
link_directories(${SDL2_LIBDIR})
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7")
endif()
endif()
list(APPEND PLATFORM_LIBRARY ${SDL_LIBRARY})
list(APPEND PLATFORM_SRC ${PLATFORM_SRC} ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-events.c ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-audio.c)

View File

@ -22,6 +22,9 @@ if (SDL_VERSION EQUAL "2")
endif()
endif()
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7")
endif()
set(SDLMAIN_LIBRARY ${SDL2MAIN_LIBRARY})
endif()
endif()