PlatformIO Community

Run default Pio-build chain from esp-idf project

I have a multi platform-project where I want to support both arduino and esp-idf (and possibly some more in the future). The esp-idf system uses cmake for its building chain, wich works great, except it doesn’t allow the processing of libraries (or esp-components) in the same way (i.e. it doesn’t know about the library.json file).

I have a library with extra-scripts I would like to run based on a custom-target of the main-project.
Is there a way to add a custom target to the main project which triggers the default pio-build-chain so it would call this extrascript, regardless of what build-chain is used?

Judging the vast amount of replies I assume this is something that is not possible (yet)?

An alternative I was thinking about is a cumstom build-chain/environment. but as soon as there is a different environment (in the platform.ini) there is a different build/output directory. So that won’t work out unfortunatly.

Any suggestions I could try?