summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindDBus.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/FindDBus.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/FindDBus.cmake')
-rw-r--r--project/cmake/modules/FindDBus.cmake52
1 files changed, 0 insertions, 52 deletions
diff --git a/project/cmake/modules/FindDBus.cmake b/project/cmake/modules/FindDBus.cmake
deleted file mode 100644
index 2d64af4..0000000
--- a/project/cmake/modules/FindDBus.cmake
+++ /dev/null
@@ -1,52 +0,0 @@
1#.rst:
2# FindDBUS
3# -------
4# Finds the DBUS library
5#
6# This will will define the following variables::
7#
8# DBUS_FOUND - system has DBUS
9# DBUS_INCLUDE_DIRS - the DBUS include directory
10# DBUS_LIBRARIES - the DBUS libraries
11# DBUS_DEFINITIONS - the DBUS definitions
12#
13# and the following imported targets::
14#
15# DBus::DBus - The DBUS library
16
17if(PKG_CONFIG_FOUND)
18 pkg_check_modules(PC_DBUS dbus-1 QUIET)
19endif()
20
21find_path(DBUS_INCLUDE_DIR NAMES dbus/dbus.h
22 PATH_SUFFIXES dbus-1.0
23 PATHS ${PC_DBUS_INCLUDE_DIR})
24find_path(DBUS_ARCH_INCLUDE_DIR NAMES dbus/dbus-arch-deps.h
25 PATH_SUFFIXES dbus-1.0/include
26 PATHS ${PC_DBUS_LIBDIR}
27 /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE})
28find_library(DBUS_LIBRARY NAMES dbus-1
29 PATHS ${PC_DBUS_LIBDIR})
30
31set(DBUS_VERSION ${PC_DBUS_VERSION})
32
33include(FindPackageHandleStandardArgs)
34find_package_handle_standard_args(DBus
35 REQUIRED_VARS DBUS_LIBRARY DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR
36 VERSION_VAR DBUS_VERSION)
37
38if(DBUS_FOUND)
39 set(DBUS_LIBRARIES ${DBUS_LIBRARY})
40 set(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
41 set(DBUS_DEFINITIONS -DHAVE_DBUS=1)
42
43 if(NOT TARGET DBus::DBus)
44 add_library(DBus::DBus UNKNOWN IMPORTED)
45 set_target_properties(DBus::DBus PROPERTIES
46 IMPORTED_LOCATION "${DBUS_LIBRARY}"
47 INTERFACE_INCLUDE_DIRECTORIES "${DBUS_INCLUDE_DIR}"
48 INTERFACE_COMPILE_DEFINITIONS HAVE_DBUS=1)
49 endif()
50endif()
51
52mark_as_advanced(DBUS_INCLUDE_DIR DBUS_LIBRARY)