Hi I have a similar question partially discussed in How to include library and header files from another one of my projects?
my project has the following structures
mainProj/
meson.build
src/
lib1/
include/
src/
meson.build
lib2/
include/
src/
meson.build
lib3/
include/
src/
meson.build
libNomeson1/
include/
src/
progMain
include/
src/
...
main.c
meson.build
build/
the proj structures can't be changed and the lib# projects belongs to different teams,
now progMain proj needs to pickup headers from the lib#, and also can happen that lib1 needs to pick up header from lib3....
in the meson.build of progMain proj I have declared headers included:
public_headers = include_directories('../',
'inc',
)
when I go to configure I got the warning
|progMain| WARNING: include_directories sandbox violation!
The project is trying to access the directory ../ which belongs to a different
subproject. This is a problem as it hardcodes the relative paths of these two projeccts.
This makes it impossible to compile the project in any other directory layout and also
prevents the subproject from changing its own directory layout.
Instead of poking directly at the internals the subproject should be executed and
it should set a variable that the caller can then use. Something like:
# In subproject
some_dep = declare_depencency(include_directories: include_directories('include'))
# In parent project
some_dep = depencency('some')
executable(..., dependencies: [some_dep])
This warning will become a hard error in a future Meson release.
but the suggestion does not fit my project layout