Working on migrating a project from Projucer to CMake. Using JUCE 6.0.8 at the moment.
We have written our CMakeLists to use
juce_add_plugin, like so:
juce_add_plugin( MyPlugin .... FORMATS Standalone VST VST3 AU AAX ) .... target_link_libraries( MyPlugin PUBLIC juce::juce_audio_basics juce::juce_audio_devices juce::juce_audio_formats juce::juce_audio_plugin_client juce::juce_audio_processors juce::juce_audio_utils juce::juce_core juce::juce_cryptography juce::juce_data_structures juce::juce_dsp juce::juce_events juce::juce_graphics juce::juce_gui_basics juce::juce_gui_extra juce::juce_opengl juce::juce_osc juce::juce_video )
The thing we are noticing is that a lot of the dependencies for every type of plugin client are showing up in every plugin. This has led to an increase in build times, especially in CI where it seems every plugin is now building extra stuff, including plugin client formats we are not even targeting?
Here we have the target membership generated by Projucer, which only contains the client code for the specified target type
Here we have the sources being included by the CMake target:
Is there something I’m missing in controlling the way the sources get added to the auto generated plugin targets? Or is this a deficiency in the CMake API?