arduino-cmake / Arduino-CMake-NG

CMake-Based framework for Arduino platforms
MIT License
138 stars 39 forks source link

Fixed support for 3rd Party Arduino libraries #18

Closed MrPointer closed 6 years ago

MrPointer commented 6 years ago

Until this PR, 3rd Party Arduino libraries have been treated as user libraries, which are different.
The problem is that even though they're 3rd party, those libraries conform to the Arduino library standard, include the required library.properties file and have a very similar source structure to the Built-in libraries.
Moreover, they're usually dependent on an Arduino platform, which requires them to be "first-class" libraries.

Now, these libraries can be treated as they should by calling the add_arduino_library function.
The downside of this API is that one would have to manually pass the library's sources, but on the other hand - It gives it the freedom to store the library anywhere it'd like in the host system.
If however a user still wants to keep using the find_arduino_library API, it can do so by placing the 3rd party library directory under the SDK's libraries directory, and pass the 3RD_PARTY option to the function.

This PR also added an example using a 3rd party library named Adafruit_NeoPixel.

Fixes #17.