summaryrefslogtreecommitdiff
path: root/cmake/FindDBus.cmake
blob: b6bbdb53d6e06427727a361bc855249b57c05050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
include(LibFindMacros)

libfind_pkg_check_modules(DBUS_PKGCONFIG dbus-1)

FIND_PATH(DBus_INCLUDE_DIR dbus/dbus.h
   PATHS
      ${DBUS_PKGCONFIG_INCLUDE_DIRS}
      /usr/include/dbus-1.0
#   PATH_SUFFIXES dbus
)

FIND_PATH(DBus_INCLUDE_DIR_ARCH dbus/dbus-arch-deps.h
   PATHS
      ${DBUS_PKGCONFIG_INCLUDE_DIRS}
      /usr/lib/dbus-1.0/include
#   PATH_SUFFIXES dbus
)

FIND_LIBRARY(DBus_LIBRARY
   NAMES dbus-1
   PATHS ${DBUS_PKGCONFIG_LIBRARY_DIRS}
)

set(DBus_PROCESS_INCLUDES DBus_INCLUDE_DIR DBus_INCLUDE_DIR_ARCH)
set(DBus_PROCESS_LIBS DBus_LIBRARY)
libfind_process(DBus)