but it doesn’t work
libs contains all the librairies but during build IRremoteESP8266 isn’t used.
I think the line "env.Replace(lib_deps=libs) is wrong !
I tried this on an “extraScript” called by a library.json but it doesn’t seem to work.
Is it possible to do it from a script called by a library.json ?
Mhh if you’re already inside a library you should try and make PlatformIO include the right libraries by means of dependencies declaration and libLDFMode, at most activating a few macros in an extra script for that selection to happen dynamically if it must. I also had no successs modifying platform.config.set(env_section, "lib_deps", libs) in a library’s extraScript, no matter the construction environment. If the issues remain, try opening a new topic with all info or https://github.com/platformio/platformio-core/issues.