arduino-cmake / Arduino-CMake-NG

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

Modified framework's approach to libraries directory layout #25

Closed MrPointer closed 6 years ago

MrPointer commented 6 years ago

From #23, it appears that the Arduino-CMake-NG framework hadn't had the ability to correctly manage Arduino Libraries's sources since some of them were added when not required, some not added at all.

This PR gives the framework a consistent approach to Arduino Libraries, where the following rules apply:

However, this won't suffice as users need to have an ability to manually add additional sources, and probably even entire source directories. For that, a new feature and API has been introduced - the target_source_directories function which appends all sources under a given list of directories to a target, optionally recursively. An example of the API's usage can be found in the 3rd-party-library example. Nevertheless, full documentation will soon be added.

The PR also fixed a bug regarding platform libraries, where the same platform lib couldn't be used more than once.

Fixes #23.

MrPointer commented 6 years ago

Something really bad is happening in AppVeyor right now - It can't even git-clone the PR! This only happens to one of the jobs, so let's assume it's passing and I'll just merge this.