From 0160127fda8f45e4b0c37eea71513105db67e0ac Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 1 May 2024 13:07:52 -0700 Subject: [PATCH] meson: fix usage as a subproject include directories must be passed to that projects can use headers. Also add override_dependencies to make sure that it's used when available as a subproject. Signed-off-by: Rosen Penev --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 95936a2c..0c4f7eab 100644 --- a/meson.build +++ b/meson.build @@ -699,7 +699,10 @@ xml_lib = library( version: meson.project_version(), ) -xml_dep = declare_dependency(link_with: xml_lib) +dep_inc = include_directories('include') +xml_dep = declare_dependency(include_directories: dep_inc, link_with: xml_lib) + +meson.override_dependency('libxml-2.0', xml_dep) ## xmllint tool