diff options
author | Drew DeVault <ddevault@vistarmedia.com> | 2017-07-11 22:16:56 -0400 |
---|---|---|
committer | Drew DeVault <ddevault@vistarmedia.com> | 2017-07-11 22:16:56 -0400 |
commit | b08aa9fd35d650b15a5322bd1b6edea01f152f27 (patch) | |
tree | 26a5b75622d0a750478dee5c8a5d99f5b75846b6 /CMake/FindDbus.cmake | |
parent | 7b9c330bc502f7ba4899872cc7d43de95ae5136e (diff) |
Revert "Merge pull request #27 from ascent12/meson"
This reverts commit 85805da021006697c85489c3e30717c2b807441c, reversing
changes made to 8189c64d7f07a756abf5a6189719f02b2f1af967.
Diffstat (limited to 'CMake/FindDbus.cmake')
-rw-r--r-- | CMake/FindDbus.cmake | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/CMake/FindDbus.cmake b/CMake/FindDbus.cmake new file mode 100644 index 00000000..715e527b --- /dev/null +++ b/CMake/FindDbus.cmake @@ -0,0 +1,42 @@ +#.rst: +# FindDbus +# ----------- +# +# Find Dbus library +# +# Try to find Dbus library on UNIX systems. The following values are defined +# +# :: +# +# DBUS_FOUND - True if dbus is available +# DBUS_INCLUDE_DIRS - Include directories for dbus +# DBUS_LIBRARIES - List of libraries for dbus +# DBUS_DEFINITIONS - List of definitions for dbus +# +#============================================================================= +# Copyright (c) 2015 Jari Vetoniemi +# +# Distributed under the OSI-approved BSD License (the "License"); +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= + +include(FeatureSummary) +set_package_properties(Dbus PROPERTIES + URL "http://www.freedesktop.org/wiki/Software/dbus/" + DESCRIPTION "Message bus system") + +find_package(PkgConfig) +pkg_check_modules(PC_DBUS QUIET dbus-1) +find_path(DBUS_SYSTEM_INCLUDES dbus/dbus.h PATH_SUFFIXES dbus-1.0) +find_path(DBUS_LIB_INCLUDES dbus/dbus-arch-deps.h HINTS ${PC_DBUS_INCLUDE_DIRS} ${CMAKE_LIBRARY_PATH}/dbus-1.0/include ${CMAKE_SYSTEM_LIBRARY_PATH}/dbus-1.0/include) +find_library(DBUS_LIBRARIES NAMES dbus-1 HINTS ${PC_DBUS_LIBRARY_DIRS}) + +set(DBUS_INCLUDE_DIRS ${DBUS_SYSTEM_INCLUDES} ${DBUS_LIB_INCLUDES}) +set(DBUS_DEFINITIONS ${PC_DBUS_CFLAGS_OTHER}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(DBUS DEFAULT_MSG DBUS_INCLUDE_DIRS DBUS_LIBRARIES) +mark_as_advanced(DBUS_INCLUDE_DIRS DBUS_LIBRARIES DBUS_SYSTEM_INCLUDES DBUS_LIB_INCLUDES DBUS_DEFINITIONS) |