Skip to content

How can attributes of a dependency (includes, compiler flags, etc.) be printed? #4563

@wbthomason

Description

@wbthomason

I'm building a C++ project with Meson and have an unexpected include directory added to my compiler args that's causing some problems. I'd like to be able to print the include directories and compiler args added by my external dependencies to debug this, but I haven't been able to figure out how to do so with Meson.

I'm aware of get_pkgconfig_variable, but (a) not all of my external dependencies are pkg-config dependencies and (b) I seem to be using this method incorrectly, e.g. some_dep.get_pkgconfig_variable('Cflags') tells me that the Cflags variable isn't defined for some_dep (Where some_dep.pc does have a Cflags variable defined, and I've tried all of CFlags, Cflags, and cflags in case capitalization is odd).

It seems like there should be some include_directories or includes attribute accessible for a dependency object, but I haven't been able to find anything like this. Is this possible with Meson, or am I out of luck?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions