Linux: Don't allow dolphin to be build without evdev support.

Unless explicitly requested.
This commit is contained in:
Scott Mansell 2015-06-30 23:57:54 +12:00
parent ad714993aa
commit 0dc8763247

View File

@ -22,6 +22,10 @@ else()
option(ENABLE_SDL "Enables SDL as a generic controller backend" OFF) option(ENABLE_SDL "Enables SDL as a generic controller backend" OFF)
endif() endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT ANDROID)
option(ENABLE_EVDEV "Enables the evdev controller backend" ON)
endif()
if(APPLE) if(APPLE)
option(OSX_USE_DEFAULT_SEARCH_PATH "Don't prioritize system library paths" OFF) option(OSX_USE_DEFAULT_SEARCH_PATH "Don't prioritize system library paths" OFF)
endif() endif()
@ -529,16 +533,16 @@ if(USE_EGL)
add_definitions(-DUSE_EGL=1) add_definitions(-DUSE_EGL=1)
endif() endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") if(ENABLE_EVDEV)
include(FindLibudev OPTIONAL) include(FindLibudev REQUIRED)
include(FindLibevdev OPTIONAL) include(FindLibevdev REQUIRED)
if(LIBUDEV_FOUND AND LIBEVDEV_FOUND) if(LIBUDEV_FOUND AND LIBEVDEV_FOUND)
message("libevdev/libudev found, enabling evdev controller backend") message("libevdev/libudev found, enabling evdev controller backend")
add_definitions(-DHAVE_LIBUDEV=1) add_definitions(-DHAVE_LIBUDEV=1)
add_definitions(-DHAVE_LIBEVDEV=1) add_definitions(-DHAVE_LIBEVDEV=1)
include_directories(${LIBUDEV_INCLUDE_DIR} ${LIBEVDEV_INCLUDE_DIR}) include_directories(${LIBUDEV_INCLUDE_DIR} ${LIBEVDEV_INCLUDE_DIR})
else() else()
message("Could find libevdev/libudev, disabling evdev controller backend") message(FATAL_ERROR "Couldn't find libevdev and/or libudev. Can't build evdev controller backend.\nDisable ENABLE_EVDEV if you wish to build without controller support")
endif() endif()
endif() endif()