# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright (C) 2026 Max A. Vilkki a.k.a. codise
#
# flipSID's modules, each a static library with a narrow interface (DESIGN §2.3, §3):
#
#   core/common        lock-free queue, audio ring and triple buffer
#   core/log           the app's log file (plus stderr)
#   core/settings      the settings file, JSON helpers, atomic file writes
#   core/player        libsidplayfp engine on the audio thread, command queue
#   core/library       HVSC index, STIL, Songlengths, search
#   core/engines       emulation settings, libsidplayfp builders (reSIDfp, classic reSID)
#   core/songlengths   HVSC song lengths plus the user overlay
#   core/profiles      SID profiles and their resolution per tune
#   core/playlist      playlist model and persistence
#   core/sidstate      per-voice SID state that feeds the visuals
#   core/output        emulated audio or a hardware output target
#   core/sidout        register writes for host-driven SID hardware (DESIGN §7.3)
#   ultimate           Ultimate-II+ / Ultimate 64 control
#   mixer              a digital mixer's channel fader over the network (fades for real SIDs)
#   hardsid            HardSID 4U: wire protocol, USB transport (libusb), device
#   hvsc               HVSC onto the disk: download a release, unpack it, install it
#   recording          audio recording (FLAC)
#   visuals            SID visualisations
#   ui                 ImGui panels and theme
#   platform           sleep and wake notices, the hold against App Nap (later: media
#                      keys, now-playing, file associations)
#
# Each module directory gets its own CMakeLists.txt that defines flipsid_<module> with an
# alias flipsid::<module> and calls flipsid_configure_target(). Core modules must not
# link ext::imgui or ui. Modules are added here as they land.

set(flipsidModules
    core/common
    core/log
    core/sidstate
    core/songlengths
    core/profiles
    core/playlist
    core/library
    core/engines
    core/settings
    core/output
    core/player
    core/sidout
    ultimate
    mixer
    hardsid
    hvsc
    recording
    visuals
    ui
    platform
)
foreach(module IN LISTS flipsidModules)
    if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${module}/CMakeLists.txt")
        add_subdirectory(${module})
    endif()
endforeach()
