CMake: Make evdev optional

This commit is contained in:
Connor McLaughlin
2021-02-27 20:53:00 +10:00
parent 47e26b1ad3
commit faa8ed0031
4 changed files with 13 additions and 10 deletions

View File

@ -75,7 +75,7 @@ if(SDL2_FOUND)
endif()
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if(USE_EVDEV)
find_package(LIBEVDEV REQUIRED)
target_compile_definitions(frontend-common PUBLIC "-DWITH_EVDEV=1")
target_include_directories(frontend-common PRIVATE ${LIBEVDEV_INCLUDE_DIRS})