McMartin / FRUT

Building JUCE projects using CMake made easy
https://frut.readthedocs.io
GNU General Public License v3.0
431 stars 40 forks source link

Not finding AudioUnitSDK files inside of juce_audio_plugin_client module #751

Closed hsetlik closed 1 year ago

hsetlik commented 1 year ago

I converted a Projucer plugin project to CMake using FRUT; the VST3 builds just fine but the AudioUnit fails to build with this error:

In file included from /Users/hayden/Documents/dev/Romplur-Main/RomplurPlugin/build/JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm:9:
In file included from /Users/hayden/Documents/dev/Romplur-Main/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm:26:
In file included from /Users/hayden/Documents/dev/Romplur-Main/JUCE/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm:55:
/Users/hayden/Documents/dev/Romplur-Main/JUCE/modules/juce_audio_plugin_client/AU/AudioUnitSDK/MusicDeviceBase.h:8:10: fatal error: 'AudioUnitSDK/AUMIDIBase.h' file not found
#include <AudioUnitSDK/AUMIDIBase.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[3]: *** [CMakeFiles/RomplurPlugin_AU.dir/JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm.o] Error 1

All the files are there within the JUCE installation, and building the AU from the Projucer still works. The audio plugin client JUCE module is getting included in the FRUT-generated CMakeLists.txt like so:

jucer_project_module(
  juce_audio_plugin_client
  PATH "${JUCE_MODULES_GLOBAL_PATH}"
  JUCE_VST3_CAN_REPLACE_VST2 OFF
  # JUCE_FORCE_USE_LEGACY_PARAM_IDS
  # JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE
  # JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS
  # JUCE_AU_WRAPPERS_SAVE_PROGRAM_STATES
  # JUCE_STANDALONE_FILTER_WINDOW_USE_KIOSK_MODE
)

Is there some other place I need to make sure that the AudioUnitSDK headers get included? For context I'm on macOS Monterey using JUCE 7.0.4 and Unix Makefiles as a generator. Any help or insight appreciated.

McMartin commented 1 year ago

Hi @hsetlik,

Thanks for using FRUT and opening this issue!

The root cause is that FRUT hasn't been adapted to the changes made in https://github.com/juce-framework/JUCE/commit/f8e91d40039085f280cad823e1419e9269c8f55c yet. I'll try to work on fixing that quickly.

If you still want to use FRUT, one temporary solution would be to use JUCE 7.0.2, since that commit was part of JUCE 7.0.3.

I hope this helps!

McMartin commented 1 year ago

Hi @hsetlik,

I've opened https://github.com/McMartin/FRUT/pull/753 to fix this issue. Could you please give it a try and let me know whether you can build your AudioUnit plugin with JUCE 7.0.4?

Thanks!

hsetlik commented 1 year ago

Oh sorry just saw this- this is on the support-AudioUnitSDK branch of FRUT?

McMartin commented 1 year ago

@hsetlik Exactly. I pushed the branch support-AudioUnitSDK and I opened the PR #753 to merge that branch into main once you confirm that it works for you.

hsetlik commented 1 year ago

Just tested that branch and it works correctly on JUCE 7.0.4, thanks!

McMartin commented 1 year ago

@hsetlik Thanks a bunch!