Skip to content
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

Proposal: Different #define handling in ofMain.h #6948

Open
dimitre opened this issue Apr 22, 2022 · 0 comments
Open

Proposal: Different #define handling in ofMain.h #6948

dimitre opened this issue Apr 22, 2022 · 0 comments

Comments

@dimitre
Copy link
Member

dimitre commented Apr 22, 2022

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
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant