# Golden render tools (configure with -DET_BUILD_GOLDEN=ON). One executable per plugin, linked
# against the plugin's SharedCode library: the processor and editor object code that also goes
# into the VST3/AU, compiled with the plugin's own flags. See tools/golden/README.md.
set(ET_GOLDEN_PLUGINS VocalChain KickTune KickBassCheck VocalRider BusBalance HeadroomCheck NotePan
    Pump Punch Colour Loud Reference KickSynth SubBass VocalPocket Harmony EQ DrumWidener Wings)
set(ET_GOLDEN_TARGETS)
foreach(plugin ${ET_GOLDEN_PLUGINS})
    if(TARGET ${plugin})
        add_executable(golden_${plugin} golden.cpp)
        # as JUCE does for the plugin wrappers: the shared code's include dirs (module headers), and
        # its public definitions through the link
        target_include_directories(golden_${plugin} PRIVATE $<TARGET_PROPERTY:${plugin},INCLUDE_DIRECTORIES>)
        target_link_libraries(golden_${plugin} PRIVATE ${plugin})
        list(APPEND ET_GOLDEN_TARGETS golden_${plugin})
    endif()
endforeach()
add_custom_target(golden_all DEPENDS ${ET_GOLDEN_TARGETS})
