Add platform dependent dependency in library.json

I have developed a private library which will be used by my other projects on different platforms (espressif32 and atmeavr)
If the library is used on an atmelavr platform it is dependent on my local fork of StandardCplusplus repository.
I’ve specififed this in the library.json file of the private library as shown below (only part if it is included here). But when i run pio lib install it still installs the StandardCplusplus in the lib_deps folder of my espressif32 board.

What am I doing wrong?

    "dependencies": [
    {
        "platforms": "atmelavr",
        "name": "StandardCplusplus",
        "version": "https://github.com/I-Connect/StandardCplusplus"
    }
]

Ok, found the problem …
In the library.json of the library I specified the supported platforms wrong
It was
“platforms”: “espressif32,atmelavr”
It should be
“platforms”: [
“espressif32”,
“atmelavr”
],

2 Likes