mirror of https://github.com/wb2osz/direwolf.git
udev rules location
This commit is contained in:
parent
22c1042882
commit
ea93fcd424
|
@ -210,6 +210,7 @@ if (C_CLANG OR C_GCC)
|
|||
# TODO:
|
||||
# Try error checking -fsanitize=bounds-strict -fsanitize=leak
|
||||
# Requires libubsan and liblsan, respectively.
|
||||
# Maybe -fstack-protector-all, -fstack-check
|
||||
|
||||
###set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wvla -ffast-math -ftree-vectorize -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE ${EXTRA_FLAGS}")
|
||||
if(FREEBSD)
|
||||
|
|
|
@ -28,10 +28,15 @@ file(WRITE "${CMAKE_BINARY_DIR}/direwolf.conf" "${file_content}")
|
|||
# There are two locations. The one in /etc/udev/rules.d is meant for local customization and
|
||||
# takes precedence for the same name.
|
||||
# https://sources.debian.org/src/direwolf/1.7+dfsg-2/debian/patches/lib-udev-rules/
|
||||
# says that we should use the /usr/lib/udev/rules.d location.
|
||||
# says that we should use the /usr/lib/udev/rules.d location when building a package.
|
||||
# TODO: I think the proper solution is to select the location based on whether
|
||||
# the application installation location is /usr/local or /usr.
|
||||
if(LINUX)
|
||||
#install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/)
|
||||
install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /usr/lib/udev/rules.d/)
|
||||
if (CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
|
||||
install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/)
|
||||
else()
|
||||
install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /usr/lib/udev/rules.d/)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR})
|
||||
|
|
Loading…
Reference in New Issue