Can I specify build flags for a dependency?

I would like to specify build flags (specifically -D and -U to enable/disable specific features in the library I use).

This is actually in another library, so I tried adding
"build" : { “flags” : “-DBLABLA=1” }
to the “dependencies” entry for the dependent library in my library.json.

Needless to say, that didn’t work:slight_smile:

Is there another way to do what I want? I would like users of my library to automatically get the correct compile time options for the third-party library that is used by my library…

Same issue, I join the question.

The only way I could see this working is via extraScript and advanvced scripting.

Otherwise please file an issue in Issues · platformio/platformio-core · GitHub.

OK thanks, this suggest that it isn’t a very common approach and I should find different alternatives. :sweat_smile: