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