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()