How to get the include directories from a dependency in meson build system
Asked Answered
V

1

7

In meson build system, I want to get the include directories from a dependency:

Simple example meson.build, using wxWidgets dependecy as example:

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])

How can I get the include directories from a dependency for use in subsequent commands?

Vick answered 26/3, 2020 at 9:41 Comment(0)
F
0

A bit late response, but hope it will help you anyway.

meson's dependency object contains following things: source and header files, libraries to link with, compiler flags and linker flags.

So, answering your question directly - you should only pass wxdep as a dependency to your target, and meson will handle all other things inside.

Fiann answered 2/1, 2021 at 20:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.