在介子构建系统中,我想从依赖项获取包含目录:
简单的例子 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)
如何从依赖项中获取包含目录以便在后续命令中使用?
回复有点晚了,但还是希望对你有帮助。
meson 的dependency对象包含以下内容:源文件和头文件、要链接的库、编译器标志和链接器标志。
因此,直接回答你的问题 - 你应该只wxdep作为目标的依赖传递,介子将处理内部的所有其他事情。
| 归档时间: |
|
| 查看次数: |
2108 次 |
| 最近记录: |