From 6a3bee8b5bb455417b6f09640801e86bfe770392 Mon Sep 17 00:00:00 2001 From: Carl Philipp Klemm Date: Mon, 15 Sep 2025 11:50:23 +0200 Subject: [PATCH] add option to avoid install the udev rules --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cdacf1..0e6b4cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,8 @@ add_compile_definitions(VERSION_MAJOR=${CMAKE_PROJECT_VERSION_MAJOR}) add_compile_definitions(VERSION_MINOR=${CMAKE_PROJECT_VERSION_MINOR}) add_compile_definitions(VERSION_PATCH=${CMAKE_PROJECT_VERSION_PATCH}) +option(UDEV_RULES "install udev files" ON) + set(SRC_FILES eismultiplexer.c usbshm.c) if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows") @@ -81,7 +83,7 @@ else (DOXYGEN_FOUND) message("Doxygen needs to be installed to generate the doxygen documentation") endif (DOXYGEN_FOUND) -if(CMAKE_SYSTEM_NAME MATCHES "^Linux") +if(CMAKE_SYSTEM_NAME MATCHES "^Linux" AND UDEV_RULES) set(UDEV_RULES_INSTALL_DIR /lib/udev/rules.d CACHE PATH "install directory for linux udev config") install(FILES 90-eismultiplexer.rules DESTINATION ${UDEV_RULES_INSTALL_DIR}) endif()