summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindUDev.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2016-03-08 21:02:53 +0100
committermanuel <manuel@mausz.at>2016-03-08 21:02:53 +0100
commit9fc8b732737f139d3e466510d75668ab45578960 (patch)
tree76db9bf5cb8cc869be908a5ed3d6f4cca3e3608a /project/cmake/modules/FindUDev.cmake
parentb75e2659df11c23aa921d2eed83c23adc282ed27 (diff)
downloadkodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.tar.gz
kodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.tar.bz2
kodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindUDev.cmake')
-rw-r--r--project/cmake/modules/FindUDev.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/project/cmake/modules/FindUDev.cmake b/project/cmake/modules/FindUDev.cmake
new file mode 100644
index 0000000..97fa956
--- /dev/null
+++ b/project/cmake/modules/FindUDev.cmake
@@ -0,0 +1,22 @@
1# - Try to find udev
2# Once done this will define
3#
4# UDEV_FOUND - system has libudev
5# UDEV_INCLUDE_DIRS - the libudev include directory
6# UDEV_LIBRARIES - The libudev libraries
7
8if(PKG_CONFIG_FOUND)
9 pkg_check_modules (UDEV libudev)
10 list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDEDIR})
11endif()
12
13if(NOT UDEV_FOUND)
14 find_path(UDEV_INCLUDE_DIRS libudev.h)
15 find_library(UDEV_LIBRARIES udev)
16endif()
17
18include(FindPackageHandleStandardArgs)
19find_package_handle_standard_args(UDev DEFAULT_MSG UDEV_INCLUDE_DIRS UDEV_LIBRARIES)
20
21mark_as_advanced(UDEV_INCLUDE_DIRS UDEV_LIBRARIES)
22list(APPEND UDEV_DEFINITIONS -DHAVE_LIBUDEV=1)