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 <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-05-01 13:07:52 -07:00
parent a7e26707be
commit 0160127fda

View File

@ -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