Cmake support / JUCE_BUILD_HELPER_TOOLS

Hi - We’re just updating our cmake support, so we decided to use the default juce cmake implementation, and we came across something slightly strange:

As part of the Juce cmake files, you build a juceaide application. We dont need this so we decided to disabled it. We set the JUCE_BUILD_HELPER_TOOLS flag to OFF, thinking that this would do what we wanted… Except it doesnt - what it actually does, is turns the flag back on and recalls cmake, then builds an application as part of configure…

So, this leads to a couple of questions -
1.) Was this what you intended? The behaviour seems strange!
2.) How do we actually disable the juceaide application, because we dont need this at all

Thanks!
-Paul

Are you absolutely sure you don’t need it? It’s used to generate BinaryData files, the AU preprocessor definitions header, entitlements files, plists, the JuceHeader, Windows resource files, and icons. Most JUCE projects require juceaide at some point, which is why there’s currently no way to disable it.

Yes, this is intentional. When building iOS projects, we need to generate assets which will be included in the built product. The helper tool which creates these assets can’t be built with the same settings as the rest of the project, because it needs to run on the host machine. If we were to wait until build time to build juceaide, it would end up as an iOS app rather than a mac app, and we wouldn’t be able to run it to generate the required assets.

At the moment we don’t support this use-case. If you really don’t need juceaide, we could look at adding a flag which will disable it - I’d be quite surprised if it’s not used anywhere, though. To ensure that you really don’t need juceaide, consider adding a noisy logging statement at the top of main in extras/Build/juceaide/Main.cpp and then running a full build with juceaide included. If you don’t see the logging output anywhere, that might indicate that it’s safe to avoid including juceaide in the build.

1 Like

Thanks for the reply

I’d definitely be keen to see an opt out added for juceaide, its definitely not something we use; our build system is fairly custom set of cmake and surrounding features. We dont just any of the juce generated headers, rc files, icons etc we build those separately. Essentially we use Juce as a static lib, and then build all the other parts ourselves.
Ideally, it there was just a cmake cache variable we could set to completely disable juceaide that would be our preferred solution, but happy to chat about other options

Best wishes,
-Paul

I’ve updated the CMake support a bit to add a new “modules only” mode. Configuring in this mode will just add interface targets for the JUCE modules. To use this mode, set the JUCE_MODULES_ONLY option to ON when configuring JUCE.

Please let me know if you run into any problems with this change.

1 Like

Thats amazing, thanks!

Ill give it a whirl ASAP (probs next week).

Thanks for the update,
-Paul