Skip to content

Commit 8020cf3

Browse files
author
Sten
committed
[feat] prevent hardcoded install
- Introduced an environment variable that prevents the CMake installation script from installing modprobe config and udev rules to /etc/.
1 parent e493109 commit 8020cf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ install(TARGETS st-trace DESTINATION ${CMAKE_INSTALL_BINDIR})
348348
# Device configuration (Linux only)
349349
###
350350

351-
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
351+
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT PREVENT_HARDCODED_INSTALL)
352352
## Install modprobe.d conf files to /etc/modprobe.d/ (explicitly hardcoded)
353353
set(STLINK_MODPROBED_DIR "/etc/modprobe.d" CACHE PATH "modprobe.d directory")
354354
install(FILES ${CMAKE_SOURCE_DIR}/config/modprobe.d/stlink_v1.conf DESTINATION ${STLINK_MODPROBED_DIR})

0 commit comments

Comments
 (0)