Merge pull request #4755 from Orphis/cmake_sdl

cmake: Modernize SDL discovery
This commit is contained in:
Mat M
2017-02-06 11:55:03 -05:00
committed by GitHub
3 changed files with 250 additions and 198 deletions
-19
View File
@@ -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)