# --------------------------------------------------------------------------- # Plugin target # --------------------------------------------------------------------------- # JUCE 7.0.12 builds its VST3 manifest helper (juce_vst3_helper) with the same # toolchain as the plugin itself. When cross-compiling, that produces a Windows # .exe which cannot run on the Linux build host, so we disable the automatic # manifest step and inject a Windows moduleinfo.json afterwards # (see build_windows.sh). Native builds keep the automatic step. set(SERUMALT_VST3_AUTO_MANIFEST TRUE) if(CMAKE_CROSSCOMPILING) set(SERUMALT_VST3_AUTO_MANIFEST FALSE) endif() set(SERUMALT_FORMATS VST3) if(NOT WIN32) list(APPEND SERUMALT_FORMATS Standalone) endif() if(APPLE) list(APPEND SERUMALT_FORMATS AU) endif() juce_add_plugin(SerumAlt VERSION ${PROJECT_VERSION} COMPANY_NAME "SerumAlt Audio" IS_SYNTH TRUE NEEDS_MIDI_INPUT TRUE NEEDS_MIDI_OUTPUT FALSE IS_MIDI_EFFECT FALSE EDITOR_WANTS_KEYBOARD_FOCUS FALSE PLUGIN_MANUFACTURER_CODE Salt PLUGIN_CODE Sera BUNDLE_ID com.serumalt.SerumAlt FORMATS ${SERUMALT_FORMATS} PRODUCT_NAME "SerumAlt" VST3_AUTO_MANIFEST ${SERUMALT_VST3_AUTO_MANIFEST}) serumalt_configure_target(SerumAlt) # --------------------------------------------------------------------------- # MinGW cross-build: static C++/threading runtime # --------------------------------------------------------------------------- # When cross-compiling for Windows with MinGW, link libgcc / libstdc++ / # winpthread statically so the VST3 DLL is self-contained. Otherwise the DLL # imports libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll, none of # which ship with the bundle (or exist on a stock Windows host), so the host's # scan would fail to load the plugin. Native (Linux) builds are unaffected. if(MINGW) target_link_options(SerumAlt_VST3 PRIVATE -static-libgcc -static-libstdc++ -static) endif()