From a4b104e44e15fbcad23dae1462e34688c3a8d762 Mon Sep 17 00:00:00 2001 From: uvos Date: Tue, 29 Jun 2021 15:32:32 +0200 Subject: [PATCH] add udev rule for uvosled pcb --- 90-usbled.rules | 1 + CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 90-usbled.rules diff --git a/90-usbled.rules b/90-usbled.rules new file mode 100644 index 0000000..0a7412b --- /dev/null +++ b/90-usbled.rules @@ -0,0 +1 @@ +SUBSYSTEM=="usb", ATTRS{idVendor}=="fe17", GROUP="uucp" diff --git a/CMakeLists.txt b/CMakeLists.txt index bdc116e..f4b8796 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,3 +23,7 @@ add_definitions("-std=c17 -Wall -O2 -fno-strict-aliasing") install(TARGETS ${PROJECT_NAME}_test DESTINATION bin) +if(CMAKE_SYSTEM_NAME MATCHES "^Linux") + set(UDEV_RULES_INSTALL_DIR /lib/udev/rules.d CACHE PATH "install directory for linux udev config") + install(FILES 90-usbled.rules DESTINATION ${UDEV_RULES_INSTALL_DIR}) +endif()