diff options
author | Kefu Chai <kchai@redhat.com> | 2016-07-22 07:15:54 +0200 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2016-07-25 09:40:30 +0200 |
commit | 98c3df5a0d79417ef89f08ca5f79f4e8979eccba (patch) | |
tree | 65f15a604c1901b8c35296894e818b4a9f5d8d53 /cmake/modules/Findudev.cmake | |
parent | cmake: cleanup Findblkid.cmake (diff) | |
download | ceph-98c3df5a0d79417ef89f08ca5f79f4e8979eccba.tar.xz ceph-98c3df5a0d79417ef89f08ca5f79f4e8979eccba.zip |
cmake: cleanup Findudev.cmake
remove the crufts for handling the REQUIRED argument.
Signed-off-by: Kefu Chai <kchai@redhat.com>
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) |