mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-16 23:10:13 +00:00
29 lines
691 B
CMake
29 lines
691 B
CMake
# - Try to find Udev
|
|
# Once done this will define
|
|
#
|
|
# UDEV_FOUND - system has udev
|
|
# UDEV_RULES_INSTALL_DIR - the udev rules install directory
|
|
|
|
IF (NOT WIN32)
|
|
|
|
find_package(PkgConfig QUIET)
|
|
if(PKG_CONFIG_FOUND)
|
|
pkg_check_modules(UDEV "udev")
|
|
endif()
|
|
|
|
if (UDEV_FOUND)
|
|
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
|
|
--variable=udevdir udev
|
|
OUTPUT_VARIABLE UDEV_RULES_INSTALL_DIR)
|
|
|
|
string(REGEX REPLACE "[ \t\n]+" "" UDEV_RULES_INSTALL_DIR
|
|
"${UDEV_RULES_INSTALL_DIR}")
|
|
|
|
set(UDEV_RULES_INSTALL_DIR "${UDEV_RULES_INSTALL_DIR}/rules.d")
|
|
|
|
mark_as_advanced(UDEV_RULES_INSTALL_DIR)
|
|
|
|
endif ()
|
|
|
|
ENDIF ()
|