Skip to content

Commit

Permalink
Merge PR #15: Retrieve udev rules path through pkg-config if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
davidebeatrici authored Aug 31, 2024
2 parents 05d8179 + 132c92f commit f5bbe54
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/ossp-util.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ include(GNUInstallDirs)

find_package(PkgConfig REQUIRED)

pkg_check_modules(PKGCONFIG_UDEV udev QUIET)
if(PKGCONFIG_UDEV_FOUND)
pkg_get_variable(UDEVDIR udev udevdir)
else()
set(UDEVDIR "${CMAKE_INSTALL_PREFIX}/lib/udev")
endif()

set(INSTALL_UDEVRULESDIR
"${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d"
"${UDEVDIR}/rules.d"
CACHE PATH
"Install path for udev rules."
)
Expand Down

0 comments on commit f5bbe54

Please sign in to comment.