I have a library that is available for esp8266 as well as esp32. But only on esp32 the library depends on another library.
So, my library.json
looks like (abbreviated):
{
"name" : "iotsa",
...
"platforms" : [ "espressif8266", "espressif32"],
"dependencies" : [
...
{
"name" : "esp32_https_server_compat",
"platforms" : "espressif32"
}
]
}
But: if I build a project for esp8266 that uses my iotsa library for esp8266 somehow the esp32_https_server_compat
library is included in the library dependencies, and then pio tries to compile it, and then things fail. I’ve tried all 4 ldf modes of chain+
, deep+
, chain
and deep
, but no difference.
Apparently I misunderstand how platforms
within dependencies
works.
How can I include another library only when building for a specific platform?