Make udev rules and modprobe conf installation optional
@@ -23,6 +23,8 @@ else()
endif()
option(STLINK_GENERATE_MANPAGES "Generate manpages with pandoc" OFF)
+option(STLINK_INSTALL_UDEV_RULES "Install udev rules files" ON)
+option(STLINK_INSTALL_MODPROBE_CONF "Install modprobe conf files" ON)
if (POLICY CMP0042)
# Newer cmake on MacOS should use @rpath
@@ -196,12 +198,16 @@ install(TARGETS st-flash st-info
)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- file(GLOB RULES_FILES etc/udev/rules.d/*.rules)
+ if (STLINK_INSTALL_MODPROBE_CONF)
install(FILES etc/modprobe.d/stlink_v1.conf
DESTINATION ${STLINK_MODPROBED_DIR}/)
+ endif()
+ if (STLINK_INSTALL_UDEV_RULES)
+ file(GLOB RULES_FILES etc/udev/rules.d/*.rules)
install(FILES ${RULES_FILES}
DESTINATION ${STLINK_UDEV_RULES_DIR}/)
endif()
+endif()
add_subdirectory(src/gdbserver)
add_subdirectory(src/tools/gui)
