From 5c02cb96e579a61540aa1cc4ecbaf1ee2d195e42 Mon Sep 17 00:00:00 2001 From: rsn8887 Date: Thu, 14 May 2020 22:25:23 -0500 Subject: [PATCH] Fix building with latest SDL2 on Switch --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89051b7bc..7bee2b286 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,7 +137,11 @@ if(USE_SDL1) find_package(SDL_mixer REQUIRED) include_directories(${SDL_INCLUDE_DIR}) else() - find_package(SDL2 CONFIG QUIET) + if(SWITCH) + find_package(SDL2_STATIC CONFIG QUIET) + else() + find_package(SDL2 CONFIG QUIET) + endif() if (NOT SDL2_FOUND) find_package(SDL2 REQUIRED) endif()