diff options
Diffstat (limited to 'project/cmake/modules/FindDbus.cmake')
| -rw-r--r-- | project/cmake/modules/FindDbus.cmake | 21 |
1 files changed, 21 insertions, 0 deletions
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 @@ | |||
| 1 | # - Try to find dbus | ||
| 2 | # Once done this will define | ||
| 3 | # | ||
| 4 | # DBUS_FOUND - system has libdbus | ||
| 5 | # DBUS_INCLUDE_DIRS - the libdbus include directory | ||
| 6 | # DBUS_LIBRARIES - The libdbus libraries | ||
| 7 | |||
| 8 | if(PKG_CONFIG_FOUND) | ||
| 9 | pkg_check_modules (DBUS dbus-1) | ||
| 10 | endif() | ||
| 11 | |||
| 12 | if(DBUS_FOUND) | ||
| 13 | find_path(DBUS_INCLUDE_DIRS dbus/dbus.h PATH_SUFFIXES dbus-1.0) | ||
| 14 | find_library(DBUS_LIBRARIES dbus-1.0) | ||
| 15 | endif() | ||
| 16 | |||
| 17 | include(FindPackageHandleStandardArgs) | ||
| 18 | find_package_handle_standard_args(Dbus DEFAULT_MSG DBUS_INCLUDE_DIRS DBUS_LIBRARIES) | ||
| 19 | |||
| 20 | list(APPEND DBUS_DEFINITIONS -DHAVE_DBUS=1) | ||
| 21 | mark_as_advanced(DBUS_INCLUDE_DIRS DBUS_LIBRARIES DBUS_DEFINITIONS) | ||
