2015-12-16 02:59:15 +02:00
|
|
|
# - Try to find D-Bus message bus system
|
|
|
|
# Once done this will define
|
2015-12-10 05:06:13 +02:00
|
|
|
#
|
2015-12-16 02:59:15 +02:00
|
|
|
# DBUS_FOUND - system has D-Bus message bus system
|
|
|
|
# DBUS_INCLUDES - the D-Bus message bus system include directory
|
2015-12-30 10:09:12 +02:00
|
|
|
# DBUS_ARCH_INCLUDES - the D-Bus message bus architecture include directory
|
2019-11-25 05:56:32 +00:00
|
|
|
# DBUS_LIBRARIES - the libraries needed to use D-Bus message bus system
|
2015-12-10 05:06:13 +02:00
|
|
|
#
|
2019-05-13 00:59:14 +00:00
|
|
|
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
2015-12-10 05:06:13 +02:00
|
|
|
#
|
2015-12-16 02:59:15 +02:00
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
2015-12-10 05:06:13 +02:00
|
|
|
|
2015-12-16 02:59:15 +02:00
|
|
|
if(DBUS_INCLUDES AND DBUS_LIBRARIES)
|
|
|
|
set(DBUS_FIND_QUIETLY TRUE)
|
2015-12-10 05:06:13 +02:00
|
|
|
endif()
|
|
|
|
|
2016-01-09 23:55:09 +02:00
|
|
|
if(NOT WIN32)
|
|
|
|
include(FindPkgConfig)
|
|
|
|
pkg_check_modules(PC_DBUS QUIET dbus-1)
|
|
|
|
endif()
|
|
|
|
|
2015-12-16 02:59:15 +02:00
|
|
|
find_path(DBUS_INCLUDES
|
2015-12-10 05:06:13 +02:00
|
|
|
NAMES
|
|
|
|
dbus/dbus.h
|
2015-12-16 02:59:15 +02:00
|
|
|
PATH_SUFFIXES dbus-1.0
|
2015-12-10 05:06:13 +02:00
|
|
|
HINTS
|
2015-12-16 02:59:15 +02:00
|
|
|
$ENV{DBUSDIR}/include
|
2016-01-09 23:55:09 +02:00
|
|
|
${PC_DBUS_INCLUDEDIR}
|
2015-12-16 02:59:15 +02:00
|
|
|
${INCLUDE_INSTALL_DIR}
|
2015-12-10 05:06:13 +02:00
|
|
|
)
|
|
|
|
|
2015-12-16 07:19:30 +02:00
|
|
|
find_path(DBUS_ARCH_INCLUDES
|
|
|
|
NAMES
|
|
|
|
dbus/dbus-arch-deps.h
|
2016-01-10 00:06:18 +02:00
|
|
|
PATH_SUFFIXES dbus-1.0/include
|
2015-12-16 07:19:30 +02:00
|
|
|
HINTS
|
|
|
|
$ENV{DBUSDIR}/include
|
2016-01-10 00:06:18 +02:00
|
|
|
$ENV{DBUSDIR}/lib
|
2016-01-09 23:55:09 +02:00
|
|
|
${PC_DBUS_INCLUDEDIR}
|
2016-01-10 00:06:18 +02:00
|
|
|
${PC_DBUS_LIBDIR}
|
2015-12-16 07:19:30 +02:00
|
|
|
${INCLUDE_INSTALL_DIR}
|
2016-02-01 15:26:26 +02:00
|
|
|
${LIB_INSTALL_DIR}
|
2015-12-16 07:19:30 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
if(DBUS_INCLUDES AND DBUS_ARCH_INCLUDES)
|
|
|
|
set(DBUS_INCLUDES ${DBUS_INCLUDES} ${DBUS_ARCH_INCLUDES})
|
|
|
|
endif()
|
|
|
|
|
2015-12-16 02:59:15 +02:00
|
|
|
find_library(DBUS_LIBRARIES
|
|
|
|
dbus-1
|
2015-12-10 05:06:13 +02:00
|
|
|
HINTS
|
2015-12-16 02:59:15 +02:00
|
|
|
$ENV{DBUSDIR}/lib
|
2016-01-09 23:55:09 +02:00
|
|
|
${PC_DBUS_LIBDIR}
|
2015-12-16 02:59:15 +02:00
|
|
|
${LIB_INSTALL_DIR}
|
2015-12-10 05:06:13 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2016-11-16 21:02:52 +00:00
|
|
|
find_package_handle_standard_args(DBus
|
|
|
|
VERSION_VAR PC_DBUS_VERSION
|
|
|
|
REQUIRED_VARS DBUS_LIBRARIES DBUS_INCLUDES DBUS_ARCH_INCLUDES
|
|
|
|
)
|
2015-12-10 05:06:13 +02:00
|
|
|
|
2015-12-19 22:38:51 +02:00
|
|
|
mark_as_advanced(DBUS_INCLUDES DBUS_ARCH_INCLUDES DBUS_LIBRARIES)
|