summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindUDEV.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
committermanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
commitf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch)
treed8de60fc7e17edeb6f0921726c038ee54b281445 /project/cmake/modules/FindUDEV.cmake
parentae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff)
downloadkodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindUDEV.cmake')
-rw-r--r--project/cmake/modules/FindUDEV.cmake47
1 files changed, 0 insertions, 47 deletions
diff --git a/project/cmake/modules/FindUDEV.cmake b/project/cmake/modules/FindUDEV.cmake
deleted file mode 100644
index 422c437..0000000
--- a/project/cmake/modules/FindUDEV.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
1#.rst:
2# FindUDEV
3# -------
4# Finds the UDEV library
5#
6# This will will define the following variables::
7#
8# UDEV_FOUND - system has UDEV
9# UDEV_INCLUDE_DIRS - the UDEV include directory
10# UDEV_LIBRARIES - the UDEV libraries
11# UDEV_DEFINITIONS - the UDEV definitions
12#
13# and the following imported targets::
14#
15# UDEV::UDEV - The UDEV library
16
17if(PKG_CONFIG_FOUND)
18 pkg_check_modules(PC_UDEV libudev QUIET)
19endif()
20
21find_path(UDEV_INCLUDE_DIR NAMES libudev.h
22 PATHS ${PC_UDEV_INCLUDEDIR})
23find_library(UDEV_LIBRARY NAMES udev
24 PATHS ${PC_UDEV_LIBDIR})
25
26set(UDEV_VERSION ${PC_UDEV_VERSION})
27
28include(FindPackageHandleStandardArgs)
29find_package_handle_standard_args(UDEV
30 REQUIRED_VARS UDEV_LIBRARY UDEV_INCLUDE_DIR
31 VERSION_VAR UDEV_VERSION)
32
33if(UDEV_FOUND)
34 set(UDEV_LIBRARIES ${UDEV_LIBRARY})
35 set(UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
36 set(UDEV_DEFINITIONS -DHAVE_LIBUDEV=1)
37
38 if(NOT TARGET UDEV::UDEV)
39 add_library(UDEV::UDEV UNKNOWN IMPORTED)
40 set_target_properties(UDEV::UDEV PROPERTIES
41 IMPORTED_LOCATION "${UDEV_LIBRARY}"
42 INTERFACE_INCLUDE_DIRECTORIES "${UDEV_INCLUDE_DIR}"
43 INTERFACE_COMPILE_DEFINITIONS HAVE_LIBUDEV=1)
44 endif()
45endif()
46
47mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBRARY)