mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 19:02:48 +00:00
30 lines
856 B
CMake
30 lines
856 B
CMake
# Try to find UDev, once done this will define:
|
|
#
|
|
# UDEV_FOUND - system has UDev
|
|
# UDEV_INCLUDE_DIR - the libudev include directory
|
|
# UDEV_LIBS - The libudev libraries
|
|
|
|
# Copyright (c) 2010, Rafael Fernández López, <ereslibre@kde.org>
|
|
#
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
|
|
find_package(PkgConfig)
|
|
if(PKG_CONFIG_FOUND)
|
|
pkg_check_modules(PC_LIBUDEV libudev)
|
|
endif()
|
|
|
|
find_path(UDEV_INCLUDE_DIR
|
|
NAMES libudev.h
|
|
HINTS ${PC_LIBUDEV_INCLUDEDIR} ${PC_LIBUDEV_INCLUDE_DIRS}
|
|
)
|
|
|
|
find_library(UDEV_LIBS
|
|
NAMES udev
|
|
HINTS ${PC_LIBUDEV_LIBDIR} ${PC_LIBUDEV_LIBRARY_DIRS}
|
|
)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(UDev DEFAULT_MSG UDEV_INCLUDE_DIR UDEV_LIBS)
|
|
|
|
mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBS)
|