1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

CMake: Add support for ARA plugin PIPs

This commit is contained in:
attila 2022-05-04 15:29:31 +02:00
parent 31b2a86559
commit 4f4e5b6c04
3 changed files with 57 additions and 16 deletions

View file

@ -149,6 +149,7 @@ install(FILES "${JUCE_BINARY_DIR}/JUCEConfigVersion.cmake"
"${JUCE_CMAKE_UTILS_DIR}/JuceLV2Defines.h.in"
"${JUCE_CMAKE_UTILS_DIR}/LaunchScreen.storyboard"
"${JUCE_CMAKE_UTILS_DIR}/PIPAudioProcessor.cpp.in"
"${JUCE_CMAKE_UTILS_DIR}/PIPAudioProcessorWithARA.cpp.in"
"${JUCE_CMAKE_UTILS_DIR}/PIPComponent.cpp.in"
"${JUCE_CMAKE_UTILS_DIR}/PIPConsole.cpp.in"
"${JUCE_CMAKE_UTILS_DIR}/RecentFilesMenuTemplate.nib"

View file

@ -1888,26 +1888,43 @@ function(juce_add_pip header)
endif()
if(pip_kind STREQUAL "AudioProcessor")
set(source_main "${JUCE_CMAKE_UTILS_DIR}/PIPAudioProcessor.cpp.in")
_juce_get_metadata("${metadata_dict}" documentControllerClass JUCE_PIP_DOCUMENTCONTROLLER_CLASS)
# We add AAX/VST2 targets too, if the user has set up those SDKs
if(JUCE_PIP_DOCUMENTCONTROLLER_CLASS)
if(NOT TARGET juce_ara_sdk)
message(WARNING
"${header} specifies a documentControllerClass, but the ARA SDK could not be located. "
"Use juce_set_ara_sdk_path to specify the ARA SDK location. "
"This PIP will not be configured.")
endif()
set(extra_formats)
set(source_main "${JUCE_CMAKE_UTILS_DIR}/PIPAudioProcessorWithARA.cpp.in")
if(TARGET juce_aax_sdk)
list(APPEND extra_formats AAX)
juce_add_plugin(${JUCE_PIP_NAME}
FORMATS AU VST3
IS_ARA_EFFECT TRUE)
else()
set(source_main "${JUCE_CMAKE_UTILS_DIR}/PIPAudioProcessor.cpp.in")
# We add AAX/VST2 targets too, if the user has set up those SDKs
set(extra_formats)
if(TARGET juce_aax_sdk)
list(APPEND extra_formats AAX)
endif()
if(TARGET juce_vst2_sdk)
list(APPEND extra_formats VST)
endif()
# Standalone plugins might want to access the mic
list(APPEND extra_target_args MICROPHONE_PERMISSION_ENABLED TRUE)
juce_add_plugin(${JUCE_PIP_NAME}
FORMATS AU AUv3 LV2 Standalone Unity VST3 ${extra_formats}
${extra_target_args})
endif()
if(TARGET juce_vst2_sdk)
list(APPEND extra_formats VST)
endif()
# Standalone plugins might want to access the mic
list(APPEND extra_target_args MICROPHONE_PERMISSION_ENABLED TRUE)
juce_add_plugin(${JUCE_PIP_NAME}
FORMATS AU AUv3 LV2 Standalone Unity VST3 ${extra_formats}
${extra_target_args})
elseif(pip_kind STREQUAL "Component")
set(source_main "${JUCE_CMAKE_UTILS_DIR}/PIPComponent.cpp.in")
juce_add_gui_app(${JUCE_PIP_NAME} ${extra_target_args})

View file

@ -0,0 +1,23 @@
/*
==============================================================================
This file was auto-generated and contains the startup code for a PIP.
==============================================================================
*/
#include <JuceHeader.h>
#include "${JUCE_PIP_HEADER}"
//==============================================================================
juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter()
{
return new ${JUCE_PIP_MAIN_CLASS}();
}
#if JucePlugin_Enable_ARA
const ARA::ARAFactory* JUCE_CALLTYPE createARAFactory()
{
return juce::ARADocumentControllerSpecialisation::createARAFactory<${JUCE_PIP_DOCUMENTCONTROLLER_CLASS}>();
}
#endif