mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 01:49:33 -06:00
InputCommon: Update to use SDL3 and bump the SDL submodule in Externals to release-3.2.16.
This commit is contained in:
42
Externals/SDL/CMakeLists.txt
vendored
42
Externals/SDL/CMakeLists.txt
vendored
@ -1,34 +1,16 @@
|
||||
option(SDL2_DISABLE_SDL2MAIN "" ON)
|
||||
option(SDL2_DISABLE_INSTALL "" ON)
|
||||
option(SDL2_DISABLE_UNINSTALL "" ON)
|
||||
option(SDL_SHARED "Build a shared version of the library" OFF)
|
||||
option(SDL_SHARED_ENABLED_BY_DEFAULT "" OFF)
|
||||
option(SDL_STATIC "Build a static version of the library" ON)
|
||||
option(SDL_STATIC_ENABLED_BY_DEFAULT "" ON)
|
||||
option(SDL_TEST "Build the SDL2_test library" OFF)
|
||||
option(SDL_TEST_ENABLED_BY_DEFAULT "" OFF)
|
||||
|
||||
# SDL fails to clean up old headers after version upgrades, so do that manually
|
||||
set(EXPECTED_SDL_REVISION "SDL-release-2.30.9-0")
|
||||
if (EXISTS "${CMAKE_CURRENT_BINARY_DIR}/SDL/include/SDL2/SDL_revision.h")
|
||||
file(READ "${CMAKE_CURRENT_BINARY_DIR}/SDL/include/SDL2/SDL_revision.h" ACTUAL_SDL_REVISION)
|
||||
if (NOT "${ACTUAL_SDL_REVISION}" MATCHES "${EXPECTED_SDL_REVISION}")
|
||||
message(STATUS "Found unexpected SDL2/SDL_revision.h, removing generated includes.")
|
||||
file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/SDL/include/")
|
||||
endif()
|
||||
endif()
|
||||
if (EXISTS "${CMAKE_CURRENT_BINARY_DIR}/SDL/include/SDL_revision.h")
|
||||
file(READ "${CMAKE_CURRENT_BINARY_DIR}/SDL/include/SDL_revision.h" ACTUAL_SDL_REVISION)
|
||||
if (NOT "${ACTUAL_SDL_REVISION}" MATCHES "${EXPECTED_SDL_REVISION}")
|
||||
message(STATUS "Found unexpected SDL_revision.h, removing generated includes.")
|
||||
file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/SDL/include/")
|
||||
endif()
|
||||
endif()
|
||||
set(SDL_SHARED OFF)
|
||||
set(SDL_STATIC ON)
|
||||
set(SDL_TEST_LIBRARY OFF)
|
||||
set(SDL_TESTS OFF)
|
||||
set(SDL_DISABLE_INSTALL ON)
|
||||
set(SDL_DISABLE_INSTALL_DOCS ON)
|
||||
set(SDL_INSTALL_TESTS OFF)
|
||||
|
||||
add_subdirectory(SDL)
|
||||
if (TARGET SDL2)
|
||||
dolphin_disable_warnings(SDL2)
|
||||
|
||||
if (TARGET SDL3)
|
||||
dolphin_disable_warnings(SDL3)
|
||||
endif()
|
||||
if (TARGET SDL2-static)
|
||||
dolphin_disable_warnings(SDL2-static)
|
||||
if (TARGET SDL3-static)
|
||||
dolphin_disable_warnings(SDL3-static)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user