This repository was archived by the owner on Apr 17, 2023. It is now read-only.
Modified framework's approach to libraries directory layout #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
This is taken from the Official Library Directory Structure/Layout Specifications, part of the Arduino documentation.
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_directoriesfunction 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.