-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Proposal: Different #define handling in ofMain.h #6948
Copy link
Copy link
Open
Description
What I'm proposing here is having certain defines to see if some functionality is included or not, which can be based on platform as it is now, but can be used independent of platform too.
#undef is very useful here because we can make the exceptions independent of the previously set #defines.
I mean previously set because we can make this defines in the project itself using GCC preprocessor (tested here and working)
and it can be easily set per project.
Ideas? suggestions?
#define OF_LIB_USE_THREAD
#define OF_LIB_USE_CAIRO
#define OF_LIB_USE_SERIAL
#define OF_LIB_USE_SOUND
#ifdef TARGET_NO_SOUND
#undef OF_LIB_USE_SOUND
#endif
#if defined(TARGET_EMSCRIPTEN)
#undef OF_LIB_USE_THREAD
#endif
#if defined( TARGET_OF_IOS ) | defined(TARGET_ANDROID) | defined(TARGET_EMSCRIPTEN)
#undef OF_LIB_USE_SERIAL
#undef OF_LIB_USE_CAIRO
#endifReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels