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
|
PATHS
|
||||||
${PC_LIBUDEV_LIBRARY_DIRS}
|
${PC_LIBUDEV_LIBRARY_DIRS}
|
||||||
${PC_LIBUDEV_LIBDIR}
|
${PC_LIBUDEV_LIBDIR}
|
||||||
|
/usr/lib64
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib
|
||||||
HINTS
|
HINTS
|
||||||
"${UDEV_ROOT_DIR}"
|
"${UDEV_ROOT_DIR}"
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
|
@ -49,6 +52,8 @@ find_path(UDEV_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
libudev.h
|
libudev.h
|
||||||
PATHS
|
PATHS
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
${PC_LIBUDEV_INCLUDE_DIRS}
|
${PC_LIBUDEV_INCLUDE_DIRS}
|
||||||
${PC_LIBUDEV_INCLUDEDIR}
|
${PC_LIBUDEV_INCLUDEDIR}
|
||||||
HINTS
|
HINTS
|
||||||
|
@ -66,6 +71,10 @@ find_package_handle_standard_args(UDEV
|
||||||
UDEV_INCLUDE_DIR
|
UDEV_INCLUDE_DIR
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (UDEV_INCLUDE_DIR AND UDEV_LIBRARY)
|
||||||
|
set(UDEV_FOUND TRUE)
|
||||||
|
endif (UDEV_INCLUDE_DIR AND UDEV_LIBRARY)
|
||||||
|
|
||||||
if(UDEV_FOUND)
|
if(UDEV_FOUND)
|
||||||
list(APPEND UDEV_LIBRARIES ${UDEV_LIBRARY})
|
list(APPEND UDEV_LIBRARIES ${UDEV_LIBRARY})
|
||||||
list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
|
list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
|
||||||
|
|
Loading…
Reference in New Issue