meson: add header paths to declare_dependency
The install_headers()
function is used to install the headers present
in include/<subdirectory>
.
However, when xorgproto
is used as a subproject, the headers are not
copied and the parent project is not able to find the headers included
in subdirectories.
For example, this error is generated when xserver
is built with
xorgproto
as a subproject:
fatal error: xf86dri.h: No such file or directory
41 | #include "xf86dri.h"
| ^~~~~~~~~~~
This is a known issue present in Meson: https://github.com/mesonbuild/meson/issues/2546
To workaround the issue, add the required subdirectories to
declare_dependency()
.