From 9fc8b732737f139d3e466510d75668ab45578960 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 8 Mar 2016 21:02:53 +0100 Subject: sync with upstream --- project/cmake/modules/FindDbus.cmake | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 project/cmake/modules/FindDbus.cmake (limited to 'project/cmake/modules/FindDbus.cmake') diff --git a/project/cmake/modules/FindDbus.cmake b/project/cmake/modules/FindDbus.cmake new file mode 100644 index 0000000..cdc3f52 --- /dev/null +++ b/project/cmake/modules/FindDbus.cmake @@ -0,0 +1,21 @@ +# - Try to find dbus +# Once done this will define +# +# DBUS_FOUND - system has libdbus +# DBUS_INCLUDE_DIRS - the libdbus include directory +# DBUS_LIBRARIES - The libdbus libraries + +if(PKG_CONFIG_FOUND) + pkg_check_modules (DBUS dbus-1) +endif() + +if(DBUS_FOUND) + find_path(DBUS_INCLUDE_DIRS dbus/dbus.h PATH_SUFFIXES dbus-1.0) + find_library(DBUS_LIBRARIES dbus-1.0) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Dbus DEFAULT_MSG DBUS_INCLUDE_DIRS DBUS_LIBRARIES) + +list(APPEND DBUS_DEFINITIONS -DHAVE_DBUS=1) +mark_as_advanced(DBUS_INCLUDE_DIRS DBUS_LIBRARIES DBUS_DEFINITIONS) -- cgit v1.2.3