. "${GRIMOIRE}/CMAKE_DEPENDS" &&
depends PKG-CONFIG            &&
depends pipewire              &&
depends wireplumber           &&

optional_depends alsa-lib                                 \
                 '-DCONFIG_ALSA_MIDI=yes'                 \
                 '-DCONFIG_ALSA_MIDI=no'                  \
                 'Enable alsa MIDI support?'              &&

optional_depends qt6base                                  \
                 '-DCONFIG_QT6=yes'                       \
                 '-DCONFIG_QT6=no'                        \
                 'Use qt6? (If no, uses qt5)'             &&

if is_depends_enabled $SPELL qt6base; then
  depends qt6svg
else
  depends qtbase &&
  depends qtsvg
fi &&

optional_depends wayland                                  \
                 '-DCONFIG_WAYLAND=yes'                   \
                 '-DCONFIG_WAYLAND=no'                    \
                 'Enable wayland support? (EXPERIMENTAL)' &&

if is_depends_enabled $SPELL wayland; then
  if is_depends_enabled $SPELL qt6base; then
    depends qt6wayland
  else
    depends qtwayland
  fi
fi
