openframeworks / openframeworks/projectGenerator
Proposal: Handling search paths for addon dependency libraries (libs/XXX/include)
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 90
- Forks
- 79
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 5
Description
Currently, all subdirectories under libs/XXX/include are recursively added to the include search paths.
This can sometimes cause problems.
For example, when using ofxOpenCV together with flann-lib, conflicts can occur because files with the same name exist in multiple include search paths.
In general, OpenCV expects headers to be included using paths relative to the include root, such as:
#include <opencv2/XXX.hpp>
(Although the current ofxOpenCV setup seems more complex, possibly due to OpenCV 4 support.)
Other libraries are typically designed in the same way.
Therefore, I think it would be better not to recursively add all subdirectories under libs/XXX/include by default.
If additional include paths are required, they could instead be explicitly specified in addon_config.mk.
Would this approach make sense?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how libs/XXX/include is discovered and how recursive subdirectories become include search paths. Review addon_config.mk handling, then compare the generated paths for ofxOpenCV with flann-lib. Done means the default paths avoid unintended recursive includes while addon_config.mk can provide any additional paths explicitly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100