Compiler switch for (which plugin format built)

Are there built in #define (s) to tell the code which kind of plugin is being built (VST,VST3, or Standalone, etc)?
I’m using a diagnostic utility (Visual Leak Detector) that should only be #include’d in the standalone build…

The shared portion of the code is compiled only once and shared by all the formats. The only code compiled especially for each format is that format’s wrapper. But usually all your processor and editor classes will be compiled into one static library.

So from inside your code, there is a #define to check if a Standalone is being built at all, but checking if this code is actually running in the standalone can only be done at runtime.

No nothing about runtime.
I want a #define variable that can be used in an #ifdef to compile a line if the current target being built is a standalone.

As I just explained, that’s not really supported in a standard juce build.

Is there something I could specify in Projucer “Configuration-specific Compiler Flags” section?

I guess you could add a special configuration to build just the standalone separately from the rest of the formats… in your cpp code create your own preprocessor symbol like YOURPROJ_STANDALONE_BUILD, then in Projucer, in the normal debug configuration’s flags set YOURPROJ_STANDALONE_BUILD to 0, then duplicate the debug configuration, rename it something like “Standalone Debug”, and set YOURPROJ_STANDALONE_BUILD to 1 in that config

Thanks for the suggestion!
I was just playing with the preprocessor directives and realising what you were telling me earlier :frowning:
Actually an additional debug configuration should work well in this situation.