CMake: make SDL a private dep of InputCommon

This commit is contained in:
Michael M 2017-11-09 13:52:33 -08:00 committed by Léo Lam
parent 8e0ea92ec3
commit 0eb47e1071
2 changed files with 2 additions and 5 deletions

View File

@ -114,8 +114,8 @@ if(ENABLE_SDL)
endif() endif()
if(SDL_TARGET AND TARGET ${SDL_TARGET}) if(SDL_TARGET AND TARGET ${SDL_TARGET})
target_sources(inputcommon PRIVATE ControllerInterface/SDL/SDL.cpp) target_sources(inputcommon PRIVATE ControllerInterface/SDL/SDL.cpp)
target_link_libraries(inputcommon PUBLIC ${SDL_TARGET}) target_link_libraries(inputcommon PRIVATE ${SDL_TARGET})
target_compile_definitions(inputcommon PRIVATE -DHAVE_SDL=1) target_compile_definitions(inputcommon PRIVATE "CIFACE_USE_SDL=1")
else() else()
message(STATUS "SDL NOT found, disabling SDL input") message(STATUS "SDL NOT found, disabling SDL input")
endif() endif()

View File

@ -23,9 +23,6 @@
#if defined(__APPLE__) #if defined(__APPLE__)
#define CIFACE_USE_OSX #define CIFACE_USE_OSX
#endif #endif
#if defined(HAVE_SDL) && HAVE_SDL
#define CIFACE_USE_SDL
#endif
#if defined(HAVE_LIBEVDEV) && defined(HAVE_LIBUDEV) #if defined(HAVE_LIBEVDEV) && defined(HAVE_LIBUDEV)
#define CIFACE_USE_EVDEV #define CIFACE_USE_EVDEV
#endif #endif