openframeworks / openframeworks/openFrameworks
Can't add addons from outside OF_ROOT + fix
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
I'm used to being able to add addons outside OF_ROOT by specifying their path relative to OF_ROOT/addons in addons.make, i.e:
ofxOSX
../../myExternalAddons/ofxJSON
This doesn’t work with the new makefiles anymore. This is because in config.project.mk there's some logic which decides what is a valid addon and what not. I've changed line 197 to not filterout INVALID_PROJECT_ADDONS and it now works again.
My suggestion is to not decide what is valid or what not or to make that logic include external addons. If there's something wrong in addons.make the user should fix it in addons.make. There shouldn't be any mistakes in addons.make in the first place. But I might not know the motivation behind deciding what's right and what's not?
Index: libs/openFrameworksCompiled/project/makefileCommon/config.project.mk
===================================================================
--- libs/openFrameworksCompiled/project/makefileCommon/config.project.mk (revision 6903)
+++ libs/openFrameworksCompiled/project/makefileCommon/config.project.mk (working copy)
@@ -194,7 +194,8 @@
endif
# create a list of addons, excluding invalid and platform-specific addons
- PROJECT_ADDONS = $(filter-out $(INVALID_PROJECT_ADDONS),$(REQUESTED_PROJECT_ADDONS))
+ #PROJECT_ADDONS = $(filter-out $(INVALID_PROJECT_ADDONS),$(REQUESTED_PROJECT_ADDONS))
+ PROJECT_ADDONS = $(REQUESTED_PROJECT_ADDONS)
ifdef MAKEFILE_DEBUG
$(info ---PROJECT_ADDONS---)
Contributor guide
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 in libs/openFrameworksCompiled/project/makefileCommon/config.project.mk, especially the logic around line 197 that filters INVALID_PROJECT_ADDONS from REQUESTED_PROJECT_ADDONS. Reproduce the addons.make case using an external path such as ../../myExternalAddons/ofxJSON, then verify that external addons are accepted without breaking the existing addon filtering behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100