Add SDL2 support to build system.
Dolphin code already builds against SDL2 but the build system never checks for SDL2, which is the what latest SDL is called now. SDL2 replaces SDL 1.3. This allows Dolphin to be build against SDL2, which activates certain new features such as the haptic interface.
This commit is contained in:
+19
-10
@@ -393,17 +393,26 @@ else()
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
include(FindSDL OPTIONAL)
|
||||
include(FindSDL2 OPTIONAL)
|
||||
endif()
|
||||
if(SDL_FOUND)
|
||||
message("Using shared SDL")
|
||||
include_directories(${SDL_INCLUDE_DIR})
|
||||
else(SDL_FOUND)
|
||||
# TODO: Use the prebuilt one on Windows
|
||||
message("Using static SDL from Externals")
|
||||
include_directories(Externals/SDL Externals/SDL/include)
|
||||
add_subdirectory(Externals/SDL)
|
||||
endif(SDL_FOUND)
|
||||
if(SDL2_FOUND)
|
||||
message("Using shared SDL2")
|
||||
include_directories(${SDL2_INCLUDE_DIR})
|
||||
else(SDL2_FOUND)
|
||||
# SDL2 not found, try SDL
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
include(FindSDL OPTIONAL)
|
||||
endif()
|
||||
if(SDL_FOUND)
|
||||
message("Using shared SDL")
|
||||
include_directories(${SDL_INCLUDE_DIR})
|
||||
else(SDL_FOUND)
|
||||
# TODO: Use the prebuilt one on Windows
|
||||
message("Using static SDL from Externals")
|
||||
include_directories(Externals/SDL Externals/SDL/include)
|
||||
add_subdirectory(Externals/SDL)
|
||||
endif(SDL_FOUND)
|
||||
endif(SDL2_FOUND)
|
||||
|
||||
set(SFML_FIND_VERSION TRUE)
|
||||
set(SFML_FIND_VERSION_MAJOR 1)
|
||||
|
||||
Reference in New Issue
Block a user