2 # Once done, this will define
4 # DBUS-1_FOUND - system has dbus-1
5 # DBUS-1_INCLUDE_DIRS - the dbus-1 include directories
6 # DBUS-1_LIBRARIES - link these to use dbus-1
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(DBUS-1_PKGCONF dbus-1)
14 find_path(DBUS-1_MAIN_INCLUDE_DIR
16 PATHS ${DBUS-1_PKGCONF_INCLUDE_DIRS}
19 find_path(DBUS-1_ARCH_INCLUDE_DIR
20 NAMES dbus/dbus-arch-deps.h
21 PATHS ${DBUS-1_PKGCONF_INCLUDE_DIRS}
24 SET(DBUS-1_INCLUDE_DIR
25 ${DBUS-1_MAIN_INCLUDE_DIR}
26 ${DBUS-1_ARCH_INCLUDE_DIR}
29 # Finally the library itself
30 find_library(DBUS-1_LIBRARY
32 PATHS ${DBUS-1_PKGCONF_LIBRARY_DIRS}
35 # Set the include dir variables and the libraries and let libfind_process do the rest.
36 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
37 set(DBUS-1_PROCESS_INCLUDES DBUS-1_INCLUDE_DIR DBUS-1_INCLUDE_DIRS)
38 set(DBUS-1_PROCESS_LIBS DBUS-1_LIBRARY DBUS-1_LIBRARIES)
39 libfind_process(DBUS-1)