>From 2f195bbdcead28314f479f25b7fa79009039ee26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20M=C3=BCller?= <marcus@hostalia.de>
Date: Sat, 21 Mar 2015 21:14:37 +0100
Subject: [PATCH] added UDEV_RULES_DIR option (default still is
 /etc/udev/rules.d)

---
 CMakeLists.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0597600..b1d3e8a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,10 @@ if(NOT LIB_INSTALL_DIR)
    set(LIB_INSTALL_DIR lib)
 endif()
 
+if(NOT UDEV_RULES_DIR)
+   set(UDEV_RULES_DIR "/etc/udev/rules.d")
+endif()
+
 # Set the version information here
 set(VERSION_INFO_MAJOR_VERSION 0) # increment major on api compatibility changes
 set(VERSION_INFO_MINOR_VERSION 5) # increment minor on feature-level changes
@@ -106,7 +110,7 @@ option(INSTALL_UDEV_RULES "Install udev rules for RTL-SDR" OFF)
 if (INSTALL_UDEV_RULES)
     install (
         FILES rtl-sdr.rules
-        DESTINATION "/etc/udev/rules.d"
+	DESTINATION ${UDEV_RULES_DIR}
         COMPONENT "udev"
         )
 else (INSTALL_UDEV_RULES)
-- 
2.1.0

