Since I don’t necessarily need to copy the plugin to that location in my CI environment i disabled COPY_PLUGIN_AFTER_BUILD.
However this causes a problem when validating the AU format with Pluginval. When using Pluginval to validate an AU, the AU must be copied to the correct location: /Library/Audio/Plug-Ins/Components. Otherwise Pluginval can’t find the AU (see https://github.com/Tracktion/pluginval/issues/122).
So ideally i would like to set COPY_PLUGIN_AFTER_BUILD to TRUE for the AU format but not for the AAX format. Is there a nice way to do this with the JUCE CMake API? Or would i have to create a custom command?
# Add AAX-specific options or definitions
if(JUCE_BUILD_AAX)
message(STATUS "AAX Build: will not copy plugin after build")
set(JUCE_COPY_PLUGIN_AFTER_BUILD FALSE)
endif()
# Add AU-specific options or definitions
if(JUCE_BUILD_AU)
message(STATUS "AU Build: will copy plugin into plugins directory after build")
set(JUCE_COPY_PLUGIN_AFTER_BUILD TRUE)
endif()
I’ll try this out myself on the next build - I also want to do something similar, FWIW. At the moment I just disable the copy globally for Release builds but enable it globally for Debug - I get past the permission problems for example, with the AAX builds, by forcefully rm -rf’ing the ‘/Library/Application Support/Avid/Audio/Plug-Ins/’ folder in the build-script before kicking off CMake, but this is … unsavoury … since it requires root permissions - which, okay, is being done within a CI VM anyway, but still feels gross.
While this exact feature isn’t provided out-of-the-box, you could consider setting AAX_COPY_DIR to specify a different, writable location for installed AAX plugins.