Is there a way to set preprocessor definitions for only the “standalone” “vst3” etc. build targets?
No and no! Thanks and sorry for the duplicate quesiton
Ok I have two followup questions:
JUCEApplicationBase::isStandaloneApplication()seems to be not found by my compiler? Do I need to add a specific module or include anything?
(only necessary if 1. cant be resolved) Where do I turn off the “shared code” option, so the defines dont get set all at once?
You can check during runtime if your plugin is running as a standalone with your AudioProcessor’s wrapperType member. (Check if it’s set to wrapperType_Standalone.)
wrapperType member? Please elaborate! My processor seems to have no such member and a repo wide search for “wrapper” turned out blank.
It’s a member of the AudioProcessor base class in Juce itself.
Ok that worked out!
Thank you both for your answers, much appreciated!
Hmmm I just found this will always be true, even in VSTs for some reason… Am I doing this right?
m_is_standalone_plugin = (typeid(wrapperType) == typeid(wrapperType_Standalone));
Why are you using
typeid? You should be comparing
wrapperType_Standalone directly, i.e.
wrapperType == wrapperType_Standalone
Ok now it works. I figured the WrapperTypes would be different subclasses to wrap the plugin, not literal type identifiers
Anyway thank you!