mirror of https://github.com/wb2osz/direwolf.git
Proper detection for udev.
This commit is contained in:
parent
7e44139eb3
commit
c2b231494a
|
@ -37,6 +37,9 @@ find_library(UDEV_LIBRARY
|
|||
PATHS
|
||||
${PC_LIBUDEV_LIBRARY_DIRS}
|
||||
${PC_LIBUDEV_LIBDIR}
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
HINTS
|
||||
"${UDEV_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
|
@ -49,6 +52,8 @@ find_path(UDEV_INCLUDE_DIR
|
|||
NAMES
|
||||
libudev.h
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
${PC_LIBUDEV_INCLUDE_DIRS}
|
||||
${PC_LIBUDEV_INCLUDEDIR}
|
||||
HINTS
|
||||
|
@ -66,6 +71,10 @@ find_package_handle_standard_args(UDEV
|
|||
UDEV_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if (UDEV_INCLUDE_DIR AND UDEV_LIBRARY)
|
||||
set(UDEV_FOUND TRUE)
|
||||
endif (UDEV_INCLUDE_DIR AND UDEV_LIBRARY)
|
||||
|
||||
if(UDEV_FOUND)
|
||||
list(APPEND UDEV_LIBRARIES ${UDEV_LIBRARY})
|
||||
list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
|
||||
|
|
Loading…
Reference in New Issue