SDL: Actually use FindSDL2 by default

This commit is contained in:
Vicki Pfau 2022-02-10 14:28:35 -08:00
parent 8ac1ece17a
commit 006beb0704
1 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
set(SDL_VERSION "2" CACHE STRING "Version of SDL to use (1.2 or 2)")
if (SDL_VERSION EQUAL "2")
include(FindPkgConfig)
pkg_search_module(SDL2 sdl2)
find_package(SDL2)
if (NOT SDL2_FOUND)
find_package(SDL2)
include(FindPkgConfig)
pkg_search_module(SDL2 sdl2)
endif()
if (SDL2_FOUND)