JucePluginDefines.h breaks our build

Hey JUCE Team,

I am trying out the juce6 branch and I run into errors like this:

/path/to/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU.r:29: ### Rez - noErr (0) during open of "JucePluginDefines.h".
Fatal Error!
/path/to/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU.r:29: ### Rez - Fatal Error, can't recover.
JucePluginDefines.h: ### Rez - Since errors occurred, /path/to/my/repo/cmake-build-debug/Apps/MyApp/MyApp.rsrc's resource fork was not completely updated.

It seems to be related to this:

“The JucePluginDefines file should be a file in your project, containing info to describe the plugin’s name, type, etc. The Projucer will generate this file automatically for you.”

Now, we don’t use the Projucer, we use CMake instead. Obviously we would like to migrate to the new built-in support for CMake in JUCE 6, but that’s quite a significant undertaking and will take time. Is there any workaround in the meantime to compile with JUCE 6 but without the Projucer? Is there any tool / code snippet / something that we can use to generate this new JucePluginDefines.h file?

I guess it would also be great to get rid of Rez on the JUCE side – afaik, it isn’t needed at all anymore on modern macOS, is it? But I also suspect that this isn’t the only thing that depends on this new JucePluginDefines.h thing?

JucePluginDefines is just a stripped-down AppConfig.h. If you were previously generating an AppConfig somehow, you can just rename that file to JucePluginDefines and the build should succeed.

I cannot change how the AppConfig.h is generated because we use FRUT for that. What I could do is I could create a file JucePluginDefines.h somewhere that is in our include path and then just #include "AppConfig.h" in there. And it ALMOST works except that the Rez tool doesn’t know about those include paths and the whole build then fails because of that :frowning:

@timur
Please create an issue on FRUT (https://github.com/McMartin/FRUT/issues/new) and I’ll have a look at how hard it would be to fix that problem. Thanks!

Done! https://github.com/McMartin/FRUT/issues/623

In the meantime, we found a workaround. We manually create this new header file per target in CMake using configure_file and place it somewhere where the Rez tool can find it.

1 Like