Skip to content

Commit

Permalink
Merge pull request #4755 from Orphis/cmake_sdl
Browse files Browse the repository at this point in the history
cmake: Modernize SDL discovery
  • Loading branch information
lioncash committed Feb 6, 2017
2 parents 02127e3 + a7c4fd9 commit f978765
Show file tree
Hide file tree
Showing 3 changed files with 266 additions and 214 deletions.
19 changes: 0 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f978765

Please sign in to comment.