Out-of-process rebuild: New CMakeLists.txt — builds Plugin + Helper, bundles helper inside .vst3
Browse files1223456778910111213141513 unmodified lines293031293031323332333435363738394039414243444518 unmodified lines646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128cmake_minimum_required(VERSION 3.22)project(PluginBridge VERSION 0.1.0 LANGUAGES C CXX)project(PluginBridge VERSION 0.2.0 LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)set(CMAKE_CXX_STANDARD_REQUIRED ON)
# JUCE as subdirectory (git submodule)add_subdirectory(JUCE)
# ─────────────────────────────────────────────────────────────# Target 1: PluginBridge VST3/AU (the plugin loaded in DAW)# ─────────────────────────────────────────────────────────────
juce_add_plugin(PluginBridge COMPANY_NAME "PluginBridge" BUNDLE_ID "com.pluginbridge.pluginbridge"13 unmodified lines
target_sources(PluginBridge PRIVATE Source/PluginBridgeProcessor.cpp Source/PluginBridgeEditor.cpp Source/McpServer.cpp Source/HostedPluginManager.cpp Source/AudioAnalyser.cpp Source/Plugin/PluginBridgeProcessor.cpp Source/Plugin/PluginBridgeEditor.cpp Source/Plugin/HelperConnection.cpp Source/Plugin/McpServer.cpp)
target_include_directories(PluginBridge PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libs ${CMAKE_CURRENT_SOURCE_DIR}/Source ${CMAKE_CURRENT_SOURCE_DIR}/Source/Plugin ${CMAKE_CURRENT_SOURCE_DIR}/Source/Shared)
target_compile_definitions(PluginBridge18 unmodified lines juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags)
# ─────────────────────────────────────────────────────────────# Target 2: PluginBridgeHelper (standalone process, hosts plugins)# ─────────────────────────────────────────────────────────────
juce_add_gui_app(PluginBridgeHelper PRODUCT_NAME "PluginBridgeHelper" BUNDLE_ID "com.pluginbridge.helper" COMPANY_NAME "PluginBridge")
target_sources(PluginBridgeHelper PRIVATE Source/Helper/main.cpp Source/Helper/HelperPluginHost.cpp Source/Helper/HelperIPC.cpp)
target_include_directories(PluginBridgeHelper PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libs ${CMAKE_CURRENT_SOURCE_DIR}/Source/Helper ${CMAKE_CURRENT_SOURCE_DIR}/Source/Shared)
target_compile_definitions(PluginBridgeHelper PRIVATE JUCE_PLUGINHOST_VST3=1 JUCE_PLUGINHOST_AU=1 JUCE_WEB_BROWSER=0 JUCE_USE_CURL=0 JUCE_DISPLAY_SPLASH_SCREEN=0 JUCE_REPORT_APP_USAGE=0)
target_link_libraries(PluginBridgeHelper PRIVATE juce::juce_audio_utils juce::juce_audio_processors juce::juce_dsp juce::juce_gui_basics juce::juce_events PUBLIC juce::juce_recommended_config_flags juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags)
# ─────────────────────────────────────────────────────────────# Post-build: Copy PluginBridgeHelper into the .vst3 bundle# ─────────────────────────────────────────────────────────────
add_dependencies(PluginBridge PluginBridgeHelper)
add_custom_command(TARGET PluginBridge POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_BUNDLE_DIR:PluginBridge_VST3>/Contents/Resources" COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:PluginBridgeHelper>" "$<TARGET_BUNDLE_DIR:PluginBridge_VST3>/Contents/Resources/PluginBridgeHelper" COMMENT "Bundling PluginBridgeHelper inside PluginBridge.vst3")CMakeLists.txt+73-8