Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make udev rules and modprobe conf installation optional #741

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -196,11 +198,15 @@ install(TARGETS st-flash st-info
)

if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
file(GLOB RULES_FILES etc/udev/rules.d/*.rules)
install(FILES etc/modprobe.d/stlink_v1.conf
DESTINATION ${STLINK_MODPROBED_DIR}/)
install(FILES ${RULES_FILES}
DESTINATION ${STLINK_UDEV_RULES_DIR}/)
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)
Expand Down