diff options
Diffstat (limited to 'cmake/modules/Findudev.cmake')
-rw-r--r-- | cmake/modules/Findudev.cmake | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/cmake/modules/Findudev.cmake b/cmake/modules/Findudev.cmake index 5409a079cf9..fd936fc8887 100644 --- a/cmake/modules/Findudev.cmake +++ b/cmake/modules/Findudev.cmake @@ -24,34 +24,11 @@ # UDEV_FOUND - True if udev found. find_path(UDEV_INCLUDE_DIR libudev.h) +find_library(UDEV_LIBRARIES udev) -set(UDEV_NAMES ${UDEV_NAMES} udev) -find_library(UDEV_LIBRARY NAMES ${UDEV_NAMES}) - -if(UDEV_INCLUDE_DIR AND UDEV_LIBRARY) - set(UDEV_FOUND TRUE) - set(UDEV_LIBRARIES ${UDEV_LIBRARY}) -else() - set(UDEV_FOUND FALSE) - set(UDEV_LIBRARIES) -endif() - -if(UDEV_FOUND) - message(STATUS "Found libudev: ${UDEV_LIBRARY}") -else() - message(STATUS "Not Found libudev: ${UDEV_LIBRARY}") - if(UDEV_FIND_REQUIRED) - message(STATUS "Looked for libudev named ${UDEV_NAMES}.") - message(FATAL_ERROR "Could NOT find libudev") - endif() -endif() - -# handle the QUIETLY and REQUIRED arguments and set UUID_FOUND to TRUE if -# all listed variables are TRUE include(FindPackageHandleStandardArgs) find_package_handle_standard_args(udev DEFAULT_MSG UDEV_LIBRARIES UDEV_INCLUDE_DIR) mark_as_advanced( - UDEV_LIBRARY - UDEV_INCLUDE_DIR -) + UDEV_LIBRARIES + UDEV_INCLUDE_DIR) |