hasselmm / cmake-toolchain-arduino-cli

A CMake toolchain for Arduino entirely based upon Arduino CLI
MIT License
1 stars 0 forks source link

Discover required libraries #5

Open hasselmm opened 2 months ago

hasselmm commented 2 months ago

Arduino automatically discovers required libraries by scanning include directives. Implementing this feature is not only convenient to build unchanged Sketches with CMake. It's also needed to build Sketches for the STM32 core, which populates sketch/requiredLibraries.cpp with include directives for its system libraries.

The library search order is desribed here: https://arduino.github.io/arduino-cli/1.0/sketch-build-process/#location-priority