如何从介子构建系统中的依赖项获取包含目录

foo*_*olo 6 meson-build

在介子构建系统中,我想从依赖项获取包含目录:

简单的例子 meson.build,使用 wxWidgets dependentecy 为例:

project('project1', ['cpp'])

wxdep = dependency('wxWidgets')

wxincludes =    # ... how to get the include directories from wxdep ?

# in this case, wxincludes will be used to compile a resource file:
windows = import('windows')
windows.compile_resources('test.rc', include_directories: [wxincludes])
Run Code Online (Sandbox Code Playgroud)

如何从依赖项中获取包含目录以便在后续命令中使用?

Nam*_*der 0

回复有点晚了,但还是希望对你有帮助。

meson 的dependency对象包含以下内容:源文件和头文件、要链接的库、编译器标志和链接器标志。

因此,直接回答你的问题 - 你应该只wxdep作为目标的依赖传递,介子将处理内部的所有其他事情。