Skip to content

is an addon present? #9

Description

@bakercp

@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 class ofxMyAddon.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:

#ifdef DEFINE_OFX_MYADDON`

my special class that required OFX_MYADDON

#endif

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions