Configuration flags in module headers can be annotated with comments such as:
/** Config: MYMODULE_FOO
If 1, my module does foo. Otherwise, does bar.
*/
#ifndef MYMODULE_FOO
#define MYMODULE_FOO 1
#endif
and the Projucer will display the doc comment & default value and a checkbox.
I propose that the CMake function juce_add_module() should find config flags that are documented in this manner, and create a cmake option() for each one, with the given doc comment & default value, and setting the compile define (on the module target) based on the option’s value.
This is something I could put together a PR for, if there’s any interest.
