telepathy-qt: Farstream/CMakeLists.txt: Add dbus-glib include path
Alexandr Akulich
kaffeine at kemper.freedesktop.org
Mon Nov 11 17:28:15 UTC 2019
Module: telepathy-qt
Branch: master
Commit: 456f1ee885358998eb5c68f37c3a70a3d6200b3e
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=456f1ee885358998eb5c68f37c3a70a3d6200b3e
Author: Jan Tojnar <jtojnar at gmail.com>
Date: Tue Dec 12 23:27:16 2017 +0100
Farstream/CMakeLists.txt: Add dbus-glib include path
On traditional systems, both DBUS_GLIB_INCLUDE_DIR and DBUS_INCLUDE_DIR
point to something like /usr/include/dbus-1.0. This does need to be the
case though – for example, Nix installs each library to a separate directory
in the Nix store.
Additionally, since CMake uses its own hacky scripts instead of actually
obtaining the correct flags from pkgconfig, the DBUS_GLIB_INCLUDE_DIR
did not contain the dbus-1.0 path.
This patch fixes the DBUS_GLIB_INCLUDE_DIR variable and then adds it
to include_directories for Farstream.
---
TelepathyQt/Farstream/CMakeLists.txt | 1 +
cmake/modules/FindDBusGLib.cmake | 5 ++---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/TelepathyQt/Farstream/CMakeLists.txt b/TelepathyQt/Farstream/CMakeLists.txt
index 7dce37e9..106daab3 100644
--- a/TelepathyQt/Farstream/CMakeLists.txt
+++ b/TelepathyQt/Farstream/CMakeLists.txt
@@ -5,6 +5,7 @@ if(FARSTREAM_COMPONENTS_FOUND)
${GSTREAMER_INCLUDE_DIRS}
${GLIB2_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
+ ${DBUS_GLIB_INCLUDE_DIR}
${DBUS_INCLUDE_DIR})
set(telepathy_qt_farstream_SRCS
diff --git a/cmake/modules/FindDBusGLib.cmake b/cmake/modules/FindDBusGLib.cmake
index 44e7c380..d182f968 100644
--- a/cmake/modules/FindDBusGLib.cmake
+++ b/cmake/modules/FindDBusGLib.cmake
@@ -29,7 +29,7 @@ if(NOT WIN32)
endif()
find_path(DBUS_GLIB_INCLUDE_DIR
- NAMES dbus-1.0/dbus/dbus-glib.h
+ NAMES dbus/dbus-glib.h
HINTS
${PC_DBUS_GLIB_INCLUDEDIR}
${PC_DBUS_GLIB_INCLUDE_DIRS}
@@ -42,9 +42,8 @@ find_path(DBUS_GLIB_LOWLEVEL_INCLUDE_DIR
${PC_DBUS_GLIB_INCLUDE_DIRS}
)
-# HACK! Workaround appending "/dbus-1.0" to the HINTS above not working for some reason.
set(DBUS_GLIB_INCLUDE_DIRS
- "${DBUS_GLIB_INCLUDE_DIR}/dbus-1.0" "${DBUS_GLIB_LOWLEVEL_INCLUDE_DIR}"
+ "${DBUS_GLIB_INCLUDE_DIR}" "${DBUS_GLIB_LOWLEVEL_INCLUDE_DIR}"
)
find_library(DBUS_GLIB_LIBRARIES
More information about the telepathy-commits
mailing list