FindLIBEVDEV.cmake 994 B

12345678910111213141516171819202122232425262728293031323334
  1. # - Try to find libevdev
  2. # Once done this will define
  3. # LIBEVDEV_FOUND - System has libevdev
  4. # LIBEVDEV_INCLUDE_DIRS - The libevdev include directories
  5. # LIBEVDEV_LIBRARIES - The libraries needed to use libevdev
  6. find_package(PkgConfig)
  7. pkg_check_modules(PC_LIBEVDEV QUIET libevdev)
  8. FIND_PATH(
  9. LIBEVDEV_INCLUDE_DIR libevdev/libevdev.h
  10. HINTS ${PC_LIBEVDEV_INCLUDEDIR} ${PC_LIBEVDEV_INCLUDE_DIRS}
  11. /usr/include
  12. /usr/local/include
  13. ${LIBEVDEV_PATH_INCLUDES}
  14. )
  15. FIND_LIBRARY(
  16. LIBEVDEV_LIBRARY
  17. NAMES evdev libevdev
  18. HINTS ${PC_LIBEVDEV_LIBDIR} ${PC_LIBEVDEV_LIBRARY_DIRS}
  19. PATHS ${ADDITIONAL_LIBRARY_PATHS}
  20. ${LIBEVDEV_PATH_LIB}
  21. )
  22. set(LIBEVDEV_LIBRARIES ${LIBEVDEV_LIBRARY} )
  23. set(LIBEVDEV_INCLUDE_DIRS ${LIBEVDEV_INCLUDE_DIR} )
  24. include(FindPackageHandleStandardArgs)
  25. find_package_handle_standard_args(LIBEVDEV DEFAULT_MSG
  26. LIBEVDEV_LIBRARY LIBEVDEV_INCLUDE_DIR)
  27. mark_as_advanced(LIBEVDEV_INCLUDE_DIR LIBEVDEV_LIBRARY )