dbus/cmake
Simon McVittie 104df89947 cmake: Look for dbus-arch-deps.h next to DBus1Config.cmake
<dbus/dbus-arch-deps.h> is architecture-dependent, and compilers have
not traditionally supported an installation path for architecture-specific
headers (Debian-based systems have /usr/include/${multiarch_tuple}, but
that isn't portable beyond Debian). When dbus was built using Autotools,
dependent projects that use CMake need to look for this header in the
right place.

Unfortunately, it seems that at least recent versions of CMake will
ignore the HINTS we get from pkg-config if they are told to search in
a non-standard prefix via ${DBus1_ROOT}.

Look for dbus-arch-deps.h in a directory derived from the filename of
the CMake config file, before trying the normal search algorithm. The
CMake config file is in ${libdir}, and so is the architecture-specific
header, so this should work reasonably reliably.

According to the CMake documentation, if we search for the same thing
multiple times, the first successful result will be used; and searching
with NO_DEFAULT_PATH is the official way to prepend things to the
search order.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/314
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-03-30 07:36:38 +00:00
..
bus Move cmake related build system to top level 2019-01-22 09:57:40 +01:00
modules cmake: Only add warning flags if the compiler supports them 2022-03-29 12:21:46 +00:00
bus-test.bat.cmake * cmake: new directory, contains cmake build support. 2007-03-03 14:32:17 +00:00
config.h.cmake cmake: setup variable WORDS_BIGENDIAN correctly 2022-03-02 14:35:54 +01:00
ConfigureChecks.cmake cmake: Detect backtrace() support on platforms such as FreeBSD 2022-03-24 13:41:19 +00:00
dbus-env.bat.cmake Split DBUS_SESSION_BUS_DEFAULT_ADDRESS into listen, connect addresses and set better defaults 2012-08-13 19:57:13 +01:00
DBus1Config.cmake.in cmake: In generated cmake support files get value for DBus1_INCLUDE_DIRS variable from related cmake target 2021-11-18 13:51:11 +00:00
DBus1Config.pkgconfig.in cmake: Look for dbus-arch-deps.h next to DBus1Config.cmake 2022-03-30 07:36:38 +00:00
DBus1ConfigVersion.cmake.in cmake, autotools: Add find package config support for cmake clients 2017-03-20 14:18:45 +00:00
i686-w64-mingw32.cmake cmake: Fix warning on travis-ci 'CMAKE_FORCE_C.._COMPILER macro is deprecated' 2018-03-21 15:02:38 +01:00
x86_64-w64-mingw32.cmake travis-ci: Add cross building support for mingw 64 bit compiler 2018-03-22 21:13:47 +01:00