blob: 23ae713acc109a9f2ef64db39532a34cc6d10239 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From 632127500dabbfb42156e312d628d0467b31e213 Mon Sep 17 00:00:00 2001
From: Alexander Fasching <fasching.a91@gmail.com>
Date: Mon, 25 Nov 2019 16:27:16 +0100
Subject: [PATCH] Add build option for udev path
---
CMakeLists.txt | 3 +++
conf/CMakeLists.txt | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a55c351..5133e63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -187,6 +187,9 @@ else()
set(INSTALL_SCRIPTS_DIR "${INSTALL_DOC_DIR}/scripts")
set(INSTALL_MAN_DIR "share/man/man1")
set(INSTALL_DATA_DIR "share/${PROJECT_NAME}")
+ if (NOT DEFINED UDEV_RULES_DIR OR "${UDEV_RULES_DIR}" STREQUAL "")
+ set(UDEV_RULES_DIR "/etc/udev/rules.d")
+ endif()
endif(WIN32 OR CYGWIN)
# requirements
diff --git a/conf/CMakeLists.txt b/conf/CMakeLists.txt
index d4a229d..a84497f 100644
--- a/conf/CMakeLists.txt
+++ b/conf/CMakeLists.txt
@@ -26,7 +26,7 @@ file(WRITE "${CMAKE_BINARY_DIR}/direwolf.conf" "${file_content}")
# install udev rules for CM108
if(LINUX)
- install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/)
+ install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION ${UDEV_RULES_DIR})
endif()
install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR})
--
2.24.0
|