summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2021-10-18 10:13:07 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-11-10 15:01:29 +0100
commitcadd70e1825a49bae70e132b3fb763d429b43458 (patch)
treeb21212ad6672b5c827c8c6c98755315dc3a8578f
parentbf6bd21f7c887ffa4591ed0cee00b234835ca2be (diff)
downloadsystemd-cadd70e1825a49bae70e132b3fb763d429b43458.tar.gz
meson: use partial_dependency() to get include directory
Getting the variable directly from pkg-config (without adding the sysroot prefix) is prone to host contamination when building in sysroots as the compiler starts looking for the headers on the host in addition to the sysroot. Signed-off-by: Alexander Kanavin <alex@linutronix.de> (cherry picked from commit bfa0ade9f208c5426655a8c09f633eb0984b4b01)
-rw-r--r--meson.build9
1 files changed, 4 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index b5a51b6d0d..5bdfd9753d 100644
--- a/meson.build
+++ b/meson.build
@@ -2493,18 +2493,17 @@ endif
if conf.get('ENABLE_LOCALED') == 1
if conf.get('HAVE_XKBCOMMON') == 1
- # logind will load libxkbcommon.so dynamically on its own
- deps = [libdl]
- extra_includes = [libxkbcommon.get_pkgconfig_variable('includedir')]
+ # logind will load libxkbcommon.so dynamically on its own, but we still
+ # need to specify where the headers are
+ deps = [libdl, libxkbcommon.partial_dependency(compile_args: true)]
else
deps = []
- extra_includes = []
endif
executable(
'systemd-localed',
systemd_localed_sources,
- include_directories : includes + extra_includes,
+ include_directories : includes,
link_with : [libshared],
dependencies : deps,
install_rpath : rootlibexecdir,