-
Notifications
You must be signed in to change notification settings - Fork 34
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
is an addon present? #9
Comments
Hm, is there no way we can do this automatically, e.g. during the build process generate the defines from the list of parsed addons? The make-work character of this define (i.e. have a define which basically echoes the filename) makes me feel we should be able to automate this? The problem I see is that we have to get every addon author to add this special include, and it will be "only" useful for a subset of users, i.e. people who write addons which depend on some special functionality in another addon. It would be better if we could have a system where the dependent addon author would be the only one who would have to do something (i.e. the ifded above) to make this work for him. |
Good point @bilderbuchi -- it's very easy to do with the new makefile system, but wasn't sure how it would play out in other project files. I suppose an update project generator could also take care of this. |
Hello, was the feature suggested by @bilderbuchi added? |
@obviousjim and I were talking about conditional includes for addon header / impl files and thought that it might be useful to suggest that all addons specify a
#define
that announces the addon's presence to the system. That way other addons can conditionally include bridge classes. A proposal would be something like ... in the main classofxMyAddon.h
a define like:#define DEFINE_OFX_MYADDON
And then in the bridge classes of a dependent addon like
ofxMyAddonThatDependsOnofxMyAddon.h
one would do something like:Right now it is possible to specify required addon dependencies in
addon_config.mk
, but this is addressing the situation where an addon can optionally add features if an addon is present.@arturoc @atduskgreg @bilderbuchi
The text was updated successfully, but these errors were encountered: