mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
Merge pull request #4843 from ligfx/enable_Sdl
CMake: make option ENABLE_SDL work again
This commit is contained in:
commit
f5e940d59d
@ -51,11 +51,12 @@ if(UNIX)
|
|||||||
set(SRCS ${SRCS} ControllerInterface/Pipes/Pipes.cpp)
|
set(SRCS ${SRCS} ControllerInterface/Pipes/Pipes.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(SDL2)
|
if(ENABLE_SDL)
|
||||||
if(SDL2_FOUND)
|
find_package(SDL2)
|
||||||
|
if(SDL2_FOUND)
|
||||||
message(STATUS "Using shared SDL2")
|
message(STATUS "Using shared SDL2")
|
||||||
set(SDL_TARGET SDL2::SDL2)
|
set(SDL_TARGET SDL2::SDL2)
|
||||||
else()
|
else()
|
||||||
# SDL2 not found, try SDL
|
# SDL2 not found, try SDL
|
||||||
find_package(SDL)
|
find_package(SDL)
|
||||||
if(SDL_FOUND)
|
if(SDL_FOUND)
|
||||||
@ -65,13 +66,14 @@ else()
|
|||||||
target_link_libraries(System_SDL INTERFACE ${SDL_LIBRARY})
|
target_link_libraries(System_SDL INTERFACE ${SDL_LIBRARY})
|
||||||
set(SDL_TARGET System_SDL)
|
set(SDL_TARGET System_SDL)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(SDL_TARGET AND TARGET ${SDL_TARGET})
|
if(SDL_TARGET AND TARGET ${SDL_TARGET})
|
||||||
set(SRCS ${SRCS} ControllerInterface/SDL/SDL.cpp)
|
set(SRCS ${SRCS} ControllerInterface/SDL/SDL.cpp)
|
||||||
set(LIBS ${LIBS} ${SDL_TARGET})
|
set(LIBS ${LIBS} ${SDL_TARGET})
|
||||||
add_definitions(-DHAVE_SDL=1)
|
add_definitions(-DHAVE_SDL=1)
|
||||||
else()
|
else()
|
||||||
message(STATUS "SDL NOT found, disabling SDL input")
|
message(STATUS "SDL NOT found, disabling SDL input")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_dolphin_library(inputcommon "${SRCS}" "${LIBS}")
|
add_dolphin_library(inputcommon "${SRCS}" "${LIBS}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user