CMake: Make UDEV_RULES_PATH configurable

Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
Martin Hauke 2018-04-24 21:24:47 +02:00 committed by Steve Markgraf
parent 0325fa9496
commit a968dd5603
1 changed files with 6 additions and 1 deletions

View File

@ -104,9 +104,14 @@ add_custom_target(uninstall
########################################################################
option(INSTALL_UDEV_RULES "Install udev rules for libosmo-fl2k" OFF)
if (INSTALL_UDEV_RULES)
set(UDEV_RULES_PATH
"/etc/udev/rules.d"
CACHE STRING
"Target directory for udev rule installation. Ensure you have permissions to write to this directory."
)
install (
FILES osmo-fl2k.rules
DESTINATION "/etc/udev/rules.d"
DESTINATION ${UDEV_RULES_PATH}
COMPONENT "udev"
)
else (INSTALL_UDEV_RULES)