Fixes required for building with JUCE_APP_CONFIG_HEADER (with solution)

I have a plug-in project that’s being managed manually because it’s too complex for Projucer.

I’m in the process of updating to JUCE 6 but converting its build system to CMake is too huge of a task at the moment, so I’m looking for a quicker route.

The project makes use of the preprocessor macro JUCE_APP_CONFIG_HEADER="<AppConfig.h>" and, to port it to JUCE 6, I have renamed AppConfig.h to JucePluginDefines.h following the directions also mentioned here: JucePluginDefines.h breaks our build

That’s a good start but the stand-alone and AU builds are failing because JUCE_APP_CONFIG_HEADER doesn’t end up being included when the corresponding wrappers are compiled.

Luckily, it is easily fixable:
in juce_audio_plugin_client_AU_2.mm
and juce_audio_plugin_client_Standalone.cpp

the line

#include <juce_core/system/juce_TargetPlatform.h>

bust be added before checking for

#if JucePlugin_Build_AU

or

#if JucePlugin_Build_Standalone

respectively.

That is the same tecnique that’s already in place in juce_VST_Wrapper.cpp, and with those in place the project happily compiles.

Can you please add those?

1 Like

Bump

Should be fixed here: