Skip to content

Commit

Permalink
Make udev rules and modprobe conf installation optional (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
g-arjones authored and xor-gate committed Oct 24, 2018
1 parent 7fafee2 commit 8c46827
Showing 1 changed file with 11 additions and 5 deletions.
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

0 comments on commit 8c46827

Please sign in to comment.