duckstation

duckstation, but archived from the revision just before upstream changed it to a proprietary software project, this version is the libre one
git clone https://git.neptards.moe/u3shit/duckstation.git
Log | Files | Refs | README | LICENSE

FindUDEV.cmake (825B)


      1 # - Try to find UDEV
      2 # Once done, this will define
      3 #
      4 #  UDEV_FOUND - system has UDEV
      5 #  UDEV_INCLUDE_DIRS - the UDEV include directories
      6 #  UDEV_LIBRARIES - the UDEV library
      7 find_package(PkgConfig)
      8 
      9 pkg_check_modules(UDEV_PKGCONF libudev)
     10 
     11 find_path(UDEV_INCLUDE_DIRS
     12   NAMES libudev.h
     13   PATHS ${UDEV_PKGCONF_INCLUDE_DIRS}
     14 )
     15 
     16 find_library(UDEV_LIBRARIES
     17   NAMES udev
     18   PATHS ${UDEV_PKGCONF_LIBRARY_DIRS}
     19 )
     20 
     21 include(FindPackageHandleStandardArgs)
     22 find_package_handle_standard_args(UDEV DEFAULT_MSG UDEV_INCLUDE_DIRS UDEV_LIBRARIES)
     23 
     24 mark_as_advanced(UDEV_INCLUDE_DIRS UDEV_LIBRARIES)
     25 
     26 if(UDEV_FOUND AND NOT (TARGET UDEV::UDEV))
     27   add_library (UDEV::UDEV UNKNOWN IMPORTED)
     28   set_target_properties(UDEV::UDEV
     29     PROPERTIES
     30     IMPORTED_LOCATION ${UDEV_LIBRARIES}
     31     INTERFACE_INCLUDE_DIRECTORIES ${UDEV_INCLUDE_DIRS})
     32 endif()