Merge pull request #4755 from Orphis/cmake_sdl
cmake: Modernize SDL discovery
This commit is contained in:
@@ -704,25 +704,6 @@ if(OPENAL_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_SDL)
|
||||
find_package(SDL2)
|
||||
if(SDL2_FOUND)
|
||||
message(STATUS "Using shared SDL2")
|
||||
add_definitions(-DHAVE_SDL=1)
|
||||
include_directories(${SDL2_INCLUDE_DIR})
|
||||
else()
|
||||
# SDL2 not found, try SDL
|
||||
find_package(SDL OPTIONAL)
|
||||
if(SDL_FOUND)
|
||||
message(STATUS "Using shared SDL")
|
||||
add_definitions(-DHAVE_SDL=1)
|
||||
include_directories(${SDL_INCLUDE_DIR})
|
||||
else()
|
||||
message(STATUS "SDL NOT found, disabling SDL input")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
add_definitions(-D__LIBUSB__)
|
||||
if(NOT APPLE)
|
||||
|
||||
Reference in New Issue
Block a user