Merge pull request #6396 from lat9nq/mingw-sdl-fix

externals: Use defaults for building SDL2 on WIN32
This commit is contained in:
Morph 2021-06-01 04:14:08 -04:00 committed by GitHub
commit 65b389da70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 10 deletions

View File

@ -47,19 +47,21 @@ target_include_directories(unicorn-headers INTERFACE ./unicorn/include)
# SDL2 # SDL2
if (NOT SDL2_FOUND AND ENABLE_SDL2) if (NOT SDL2_FOUND AND ENABLE_SDL2)
# Yuzu itself needs: Events Joystick Haptic Sensor Timers if (NOT WIN32)
# Yuzu-cmd also needs: Video (depends on Loadso/Dlopen) # Yuzu itself needs: Events Joystick Haptic Sensor Timers
set(SDL_UNUSED_SUBSYSTEMS # Yuzu-cmd also needs: Video (depends on Loadso/Dlopen)
Atomic Audio Render Power Threads set(SDL_UNUSED_SUBSYSTEMS
File CPUinfo Filesystem Locale) Atomic Audio Render Power Threads
foreach(_SUB ${SDL_UNUSED_SUBSYSTEMS}) File CPUinfo Filesystem Locale)
string(TOUPPER ${_SUB} _OPT) foreach(_SUB ${SDL_UNUSED_SUBSYSTEMS})
option(SDL_${_OPT} "" OFF) string(TOUPPER ${_SUB} _OPT)
endforeach() option(SDL_${_OPT} "" OFF)
endforeach()
option(HIDAPI "" ON)
endif()
set(SDL_STATIC ON) set(SDL_STATIC ON)
set(SDL_SHARED OFF) set(SDL_SHARED OFF)
option(HIDAPI "" ON)
add_subdirectory(SDL EXCLUDE_FROM_ALL) add_subdirectory(SDL EXCLUDE_FROM_ALL)
add_library(SDL2 ALIAS SDL2-static) add_library(SDL2 ALIAS SDL2-static)