Skip to content

Commit 6321275

Browse files
committed
Add build option for udev path
1 parent 6e92a4f commit 6321275

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ else()
187187
set(INSTALL_SCRIPTS_DIR "${INSTALL_DOC_DIR}/scripts")
188188
set(INSTALL_MAN_DIR "share/man/man1")
189189
set(INSTALL_DATA_DIR "share/${PROJECT_NAME}")
190+
if (NOT DEFINED UDEV_RULES_DIR OR "${UDEV_RULES_DIR}" STREQUAL "")
191+
set(UDEV_RULES_DIR "/etc/udev/rules.d")
192+
endif()
190193
endif(WIN32 OR CYGWIN)
191194

192195
# requirements

conf/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ file(WRITE "${CMAKE_BINARY_DIR}/direwolf.conf" "${file_content}")
2626

2727
# install udev rules for CM108
2828
if(LINUX)
29-
install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/)
29+
install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION ${UDEV_RULES_DIR})
3030
endif()
3131

3232
install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR})

0 commit comments

Comments
 (0)