Skip to content

Support for recursive search on compile --libraries flag #1058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ztnel opened this issue Nov 5, 2020 · 2 comments
Open

Support for recursive search on compile --libraries flag #1058

ztnel opened this issue Nov 5, 2020 · 2 comments
Labels
topic: build-process Related to the sketch build process type: enhancement Proposed improvement

Comments

@ztnel
Copy link

ztnel commented Nov 5, 2020

Hey everyone,

Im working on an environment for building bigger arduino projects with a set of local dependancies located in the root include directory as shown below:

workspace/
│
├── include/
│   ├── Segment/
│   │   ├─── src/
│   │   │   ├─── Segment.h
│   │   │   ├─── Segment.cpp
│   ├─── package.h
│   └─── LICENSE
|   |
│   ├── Matrix/
│   │   ├─── src/
│   │   │   ├─── Matrix.h
│   │   │   ├─── Matrix.cpp
│   ├─── package.h
│   └─── LICENSE
├── src/
│   ├── src.ino
│
├── Makefile

The Makefile uses arduino-cli compile to compile the src.ino sketch and using the --libraries flag to point to ${PWD}/include/Segment and ${PWD}/include/Matrix seperately. I am trying to include all of the local libraries inside my include directory but it looks like the cli does not support a recursive search option for the --libraries flag. This is a problem for automation purposes since I don't want to have to manually add new paths to the command as the libraries grow.

Any plans on support for this type of feature? Any insight would be appreciated.

@ianfixes
Copy link

Why wouldn't you just install (or even symlink) the libraries into the Arduino libraries folder (or even a custom one, since you can specify that from the CLI)? The tool seems to follow the dependency chains in library.properties.

@ztnel
Copy link
Author

ztnel commented Nov 30, 2020

Why wouldn't you just install (or even symlink) the libraries into the Arduino libraries folder (or even a custom one, since you can specify that from the CLI)? The tool seems to follow the dependency chains in library.properties.

This is exactly how I have resolved the issue. Used --libraries ${PWD}/include as a compile flag and added the library.properties file to each of the include packages. Seems to work well for me thanks!

@per1234 per1234 changed the title Support for recursive search on compile --library flag Support for recursive search on compile --libraries flag Feb 3, 2021
@per1234 per1234 reopened this Mar 30, 2021
@umbynos umbynos added the topic: build-process Related to the sketch build process label Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: build-process Related to the sketch build process type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

6 participants