Skip to content

Commit

Permalink
Add installing udev file
Browse files Browse the repository at this point in the history
  • Loading branch information
pktiuk committed Aug 17, 2021
1 parent c358918 commit ea73401
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ endif(WITH_TESTS)
if(UNIX)
option(WITH_X11 "Compile with support for X11." ON)
option(WITH_UINPUT "Compile with support for uinput. uinput will be usable to simulate events." ON)
option(INSTALL_UINPUT_UDEV_RULES "Generate udev rules allowing users using uinput without root permissions." ON)
option(WITH_XTEST "Compile with support for XTest. XTest will be usable to simulate events." ON)
option(APPDATA "Build project with AppData file support." ON)
endif(UNIX)
Expand Down Expand Up @@ -110,6 +111,8 @@ if(UNIX)

if(WITH_UINPUT)
message("uinput support allowed for simulating events.")
else()
set(INSTALL_UINPUT_UDEV_RULES OFF)
endif(WITH_UINPUT)

if(NOT WITH_XTEST AND NOT WITH_UINPUT)
Expand Down Expand Up @@ -540,6 +543,13 @@ if(UNIX)
endif(APPDATA)
endif(UNIX)

if(UNIX)
if(INSTALL_UINPUT_UDEV_RULES)
message("Udev rules installation enabled.")
install(FILES other/60-antimcrox-uinput.rules DESTINATION "/usr/lib/udev/rules.d/")
endif(INSTALL_UINPUT_UDEV_RULES)
endif(UNIX)

# uninstall target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
Expand Down

0 comments on commit ea73401

Please sign in to comment.