summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2017-12-12 23:27:16 +0100
committerAlexander Akulich <akulichalexander@gmail.com>2019-11-09 03:08:17 +0300
commit456f1ee885358998eb5c68f37c3a70a3d6200b3e (patch)
tree89ec17847fe3ee5721db8455989571f1c2e851c8
parenteb50fad5e1fc7442509064438d26e4fb02e0175e (diff)
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.
-rw-r--r--TelepathyQt/Farstream/CMakeLists.txt1
-rw-r--r--cmake/modules/FindDBusGLib.cmake5
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