1# - FindUDev
2#
3# Copyright (C) 2015 Valve Corporation
4
5find_package(PkgConfig)
6
7pkg_check_modules(PC_LIBUDEV QUIET libudev)
8
9find_path(UDEV_INCLUDE_DIR NAMES libudev.h
10    HINTS
11    ${PC_LIBUDEV_INCLUDEDIR}
12    ${PC_LIBUDEV_INCLUDE_DIRS}
13    )
14
15find_library(UDEV_LIBRARY NAMES udev
16    HINTS
17    ${PC_LIBUDEV_LIBDIR}
18    ${PC_LIBUDEV_LIBRARY_DIRS}
19    )
20
21include(FindPackageHandleStandardArgs)
22find_package_handle_standard_args(UDev DEFAULT_MSG
23    UDEV_INCLUDE_DIR UDEV_LIBRARY)
24
25mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBRARY)
26
27set(UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
28set(UDEV_LIBRARIES ${UDEV_LIBRARY})
29