diff --git a/CMakeLists.txt b/CMakeLists.txt index 1888a72f324..f979216b5ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,17 +230,7 @@ add_compile_definitions( ) if (NOT WIN32) - find_package(SDL2 2.0.18 REQUIRED) - # Fix to support older SDL2 - # https://github.com/OpenXRay/xray-16/issues/1595 - if (NOT TARGET SDL2::SDL2 AND DEFINED SDL2_LIBRARIES) - add_library(SDL2::SDL2 UNKNOWN IMPORTED) - set_target_properties( - SDL2::SDL2 PROPERTIES - IMPORTED_LOCATION "${SDL2_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}" - ) - endif() + find_package(SDL2 2.0.18 REQUIRED NAMES SDL2 sdl2 sdl2-2.0-0) find_package(OpenAL REQUIRED) find_package(JPEG) find_package(Ogg REQUIRED)