5

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?

foolo
  • 804
  • 12
  • 22

1 Answers1

0

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

Actually, 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.