cmake: Move discovery of SDL to InputCommon

This commit is contained in:
Florent Castelli
2017-01-26 00:21:54 +01:00
parent 834ec372cc
commit a7c4fd9bf0
3 changed files with 250 additions and 198 deletions

View File

@ -711,25 +711,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)