summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2020-12-10 08:52:58 +0100
committerDaniel Schürmann <daschuer@mixxx.org>2020-12-10 09:34:08 +0100
commit1fdca9e44e6661488c13f36431b8973daa730f6d (patch)
tree52a5ec8e0075df07fe59a5944f772f77d85c21e9 /CMakeLists.txt
parent0b0619761e20e0ffdb506acbf2079acb47769061 (diff)
use dh_installudev and add INSTALL_USER_UDEV_RULES cmake option
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 13 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 98e3d58f95..335b8ab4e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1286,13 +1286,19 @@ if(UNIX AND NOT APPLE)
"${CMAKE_INSTALL_DATAROOTDIR}/metainfo"
)
- # udev rule file for USB HID and Bulk controllers
- install(
- FILES
- "${CMAKE_CURRENT_SOURCE_DIR}/res/linux/mixxx-usb-uaccess.rules"
- DESTINATION
- "${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d"
- )
+ option(INSTALL_USER_UDEV_RULES "Install user udev rule file for USB HID and Bulk controllers" ON)
+ if (INSTALL_USER_UDEV_RULES)
+ install(
+ FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/res/linux/mixxx-usb-uaccess.rules"
+ DESTINATION
+ "${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d"
+ )
+ message(WARNING "Installing udev rules to ${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d, "
+ "which is reserved for user-installed files. The correct directory for "
+ "system rules is /lib/udev/rules.d. with a appropiated priority prefix. "
+ "Adjust your package script accordingly and set -DINSTALL_USER_UDEV_RULES=OFF")
+ endif()
endif()
#