Files
serumalt/CMakeLists.txt
T
biggy facd5c5b5e chore: move build output under build/ and scripts into scripts/
Layout:
- scripts/ holds the four build scripts plus the new clean.sh
- cmake/ holds mingw64-toolchain.cmake
- the scripts default to build/linux, build/macos, build/windows, build/harness
- docs/ holds the audit documents, with the round 1 task list archived

Cleanup:
- scripts/clean.sh removes generated output, with --dry-run, --staging,
  --legacy and --all, and refuses tracked, protected or outside paths
- the Windows VST3 manifest now comes from cmake/moduleinfo.json.in, so its
  version, vendor and class IDs follow cmake/Plugin.cmake instead of a
  hand-written heredoc that could drift
- deleted the unused Source/GUI/Slider, which no code constructed
- fixed the hidden double processBlock overload: three warning lines to zero
- unslopped the build scripts, the two .cjs helpers and the CMake comments
- .gitignore covers the upstream JUCE Projucer and DemoRunner binaries

Verified: five scripts pass bash -n; the harness passes CTest with zero
warning lines; the Linux VST3 and Standalone link; the Windows cross-build
passes its x86-64, runtime-import and entry-point checks; each configure
exposes only its own targets; and a full build leaves Source/ and
third_party/JUCE unchanged. The generated manifest is identical to the
previous hand-written one.
2026-10-06 09:06:53 +02:00

90 lines
2.6 KiB
CMake

cmake_minimum_required(VERSION 3.22)
project(SerumAlt VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
option(SERUMALT_BUILD_PLUGIN "Build production plugin and standalone formats" ON)
option(SERUMALT_BUILD_TESTS "Build the headless QA harness" OFF)
if(NOT SERUMALT_BUILD_PLUGIN AND NOT SERUMALT_BUILD_TESTS)
message(FATAL_ERROR "Enable SERUMALT_BUILD_PLUGIN or SERUMALT_BUILD_TESTS")
endif()
if(NOT DEFINED JUCE_ROOT)
set(JUCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/third_party/JUCE")
endif()
add_subdirectory("${JUCE_ROOT}" "${CMAKE_CURRENT_BINARY_DIR}/third_party/JUCE")
set(SERUMALT_SOURCES
Source/PluginProcessor.cpp
Source/PluginEditor.cpp
Source/Params.cpp
Source/Wavetable.cpp
Source/Oscillator.cpp
Source/SubOscillator.cpp
Source/NoiseOscillator.cpp
Source/Filter.cpp
Source/FilterBank.cpp
Source/Envelope.cpp
Source/LFO.cpp
Source/ModulationMatrix.cpp
Source/FXProcessor.cpp
Source/MacroControls.cpp
Source/RAVEButton.cpp
Source/SynthVoice.cpp
Source/Engine.cpp
Source/Resources.cpp
Source/EffectUnits/Hyper.cpp
Source/EffectUnits/Chorus.cpp
Source/EffectUnits/Flanger.cpp
Source/EffectUnits/Phaser.cpp
Source/EffectUnits/Distortion.cpp
Source/EffectUnits/EQ.cpp
Source/EffectUnits/Compressor.cpp
Source/EffectUnits/Delay.cpp
Source/EffectUnits/Reverb.cpp
Source/GUI/Knob.cpp
Source/GUI/KnobLookAndFeel.cpp
Source/GUI/ToggleButton.cpp
Source/GUI/Display.cpp
Source/GUI/WaveformDisplay.cpp
Source/GUI/FilterDisplay.cpp
Source/GUI/EnvelopeDisplay.cpp
Source/GUI/LFODisplay.cpp
Source/GUI/Panel.cpp
Source/Presets/FactoryPresets.cpp)
function(serumalt_configure_target target)
juce_generate_juce_header(${target})
target_sources(${target} PRIVATE ${SERUMALT_SOURCES})
target_compile_definitions(${target}
PUBLIC
JUCE_WEB_BROWSER=0
JUCE_USE_CURL=0
JUCE_VST3_CAN_REPLACE_VST2=0)
target_link_libraries(${target}
PRIVATE
juce::juce_audio_utils
juce::juce_dsp
PUBLIC
juce::juce_recommended_config_flags
juce::juce_recommended_warning_flags)
if(MSVC)
target_compile_options(${target} PRIVATE /W4)
else()
target_compile_options(${target} PRIVATE -Wall -Wextra)
endif()
endfunction()
if(SERUMALT_BUILD_PLUGIN)
include(cmake/Plugin.cmake)
endif()
if(SERUMALT_BUILD_TESTS)
enable_testing()
include(cmake/Harness.cmake)
endif()