2022-10-20 05:32:31 +03: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
|
|
|
#
|
2022-10-20 05:32:31 +03:00
|
|
|
# Copyright (C) 2015 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
|
|
|
|
2022-10-02 10:34:18 +03:00
|
|
|
find_package(PkgConfig REQUIRED)
|
2020-12-03 16:33:21 +00:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
|
2020-10-26 16:27:43 +02:00
|
|
|
pkg_check_modules(PC_DBUS QUIET dbus-1)
|
2020-02-10 21:21:33 +00:00
|
|
|
|
2020-12-01 17:30:43 +00:00
|
|
|
find_path(DBUS_INCLUDES
|
|
|
|
NAMES dbus/dbus.h
|
|
|
|
PATH_SUFFIXES dbus-1.0
|
|
|
|
HINTS $ENV{DBUSDIR}/include ${PC_DBUS_INCLUDEDIR}
|
|
|
|
)
|
2020-02-10 21:21:33 +00:00
|
|
|
|
2020-12-01 17:30:43 +00:00
|
|
|
find_path(DBUS_ARCH_INCLUDES
|
|
|
|
NAMES dbus/dbus-arch-deps.h
|
|
|
|
PATH_SUFFIXES dbus-1.0/include
|
|
|
|
HINTS $ENV{DBUSDIR}/include $ENV{DBUSDIR}/lib ${PC_DBUS_INCLUDEDIR} ${PC_DBUS_LIBDIR}
|
|
|
|
)
|
2015-12-10 05:06:13 +02:00
|
|
|
|
2020-12-01 17:30:43 +00:00
|
|
|
find_library(DBUS_LIBRARIES
|
|
|
|
NAMES dbus-1
|
|
|
|
HINTS $ENV{DBUSDIR}/lib ${PC_DBUS_LIBDIR}
|
|
|
|
)
|
2015-12-16 07:19:30 +02:00
|
|
|
|
|
|
|
if(DBUS_INCLUDES AND DBUS_ARCH_INCLUDES)
|
|
|
|
set(DBUS_INCLUDES ${DBUS_INCLUDES} ${DBUS_ARCH_INCLUDES})
|
|
|
|
endif()
|
|
|
|
|
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)
|