# SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
# SPDX-License-Identifier: LicenseRef-ZrythmLicense

option (
  'profiling',
  type: 'boolean',
  value: false,
  description: 'Enable profiling with gprof')

option (
  'tests',
  type: 'boolean',
  value: false,
  description: 'Whether to compile unit tests')

option (
  'gui_tests',
  type: 'boolean',
  value: false,
  description: 'Whether to compile GUI unit tests')

option (
  'portaudio',
  type: 'feature',
  value: 'disabled',
  description: 'Compile with portaudio support (BROKEN)')

option (
  'rtmidi',
  type: 'feature',
  value: 'disabled',
  description: 'Compile with RtMidi support')

option (
  'rtaudio',
  type: 'feature',
  value: 'disabled',
  description: 'Compile with RtAudio support')

option (
  'sdl',
  type: 'feature',
  value: 'disabled',
  description: 'Compile with SDL2 backend support')

option (
  'carla',
  type: 'feature',
  value: 'enabled',
  description: 'Use Carla to wrap some plugins (note: now a hard dependency)')

option (
  'jack',
  type: 'feature',
  value: 'auto',
  description: 'Compile with JACK support')

option (
  'graphviz',
  type: 'feature',
  value: 'disabled',
  description: 'Compile with GraphViz support (for exporting graphs - only useful for developers)')

option (
  'lsp_dsp',
  type: 'feature',
  value: 'auto',
  description: 'Build with LSP DSP support for optimized DSP')

option (
  'static_lsp_dsp',
  type: 'boolean',
  value: false,
  description: 'Build with static LSP DSP lib')

option (
  'manpage',
  type: 'boolean',
  value: true,
  description: 'Build and install manpage')

option (
  'completions',
  type: 'boolean',
  value: true,
  description: 'Build and install shell completions')

option (
  'user_manual',
  type: 'boolean',
  value: false,
  description: 'Build and install user manual')

option (
  'strict_flags',
  type: 'boolean',
  value: false,
  description: 'Compile and link with strict flags (-Werror)')

option (
  'dseg_font',
  type: 'boolean',
  value: true,
  description: '''Install the DSEG14 font used by the
transport meters. Packagers should turn this off and
set the font as a dependency instead''')

option (
  'installer_ver',
  type: 'boolean',
  value: false,
  description: 'This is only used by Zrythm maintainers when making binary distributions')

option (
  'trial_ver',
  type: 'boolean',
  value: false,
  description: 'Whether this is a trial version with limited functionality')

option (
  'fallback_version',
  type: 'string',
  value: '',
  description: 'Fallback version string to use if git is not available. meson.project_version () will be used if empty.')

option (
  'extra_optimizations',
  type: 'boolean',
  value: true,
  description: 'Turn on target machine-specific optimizations and optimizations not included in -O2.')

option (
  'extra_extra_optimizations',
  type: 'boolean',
  value: false,
  description: 'Turn on more aggressive optimizations (experimental).')

option (
  'extra_debug_info',
  type: 'boolean',
  value: false,
  description: 'Enable extra debugging information (-g3).')

option (
  'program_name',
  type: 'string',
  value: 'Zrythm',
  description: 'Program name to display in the UI.')

option (
  'custom_logo_and_splash',
  type: 'boolean',
  value: false,
  description: 'Set this to true when replacing the logo and splash screen.')

option (
  'static_deps',
  type: 'boolean',
  value: false,
  description: 'Use static dependencies where possible.')

option (
  'carla_use_cv32_patchbay_variant',
  type: 'boolean',
  value: false,
  description: 'Use new CV32 variant that supports up to 64 audio ins/outs and 32 cv ins/outs (needs carla-git).')

option (
  'carla_binaries_dir',
  type: 'string',
  value: '',
  description: 'Location to collect carla discovery and bridge binaries.')

option (
  'carla_binaries_dir_32bit',
  type: 'string',
  value: '/mingw32/lib/carla',
  description: 'Location to collect carla discovery and bridge binaries (32-bit).')

option (
  'strict_sphinx_opts',
  type: 'boolean',
  value: true,
  description: 'Fail on warnings during sphinx-build.')

option (
  'opus',
  type: 'boolean',
  value: false,
  description: 'OGG OPUS support (requires libsndfile >= 1.0.29)')

option (
  'check_updates',
  type: 'boolean',
  value: true,
  description: 'Whether to check for updates on startup.')

option (
  'valgrind',
  type: 'feature',
  value: 'disabled',
  description: 'Compile with valgrind lib. Only useful for debugging.')

option (
  'appimage',
  type: 'boolean',
  value: false,
  description: 'Whether this is an AppImage build.')

option (
  'native_build',
  type: 'boolean',
  value: false,
  description: 'Whether this is a native build (will run on the same exact machine it is compiled on). This will turn on -march=native and -mtune=native')

option (
  'vamp_static',
  type: 'boolean',
  value: false,
  description: 'Whether to use static vamp libs (if available).')

option (
  'for_flathub',
  type: 'boolean',
  value: false,
  description: 'Whether building for Flathub.')

option (
  'flatpak',
  type: 'boolean',
  value: false,
  description: 'Whether building a Flatpak package.')

option (
  'x11',
  type: 'feature',
  value: 'auto',
  description: 'Compile with X11 support.')

option (
  'alsa',
  type: 'feature',
  value: 'auto',
  description: 'Compile with ALSA support.')

option (
  'pulse',
  type: 'feature',
  value: 'auto',
  description: 'Compile with PulseAudio support.')

option (
  'soundio',
  type: 'feature',
  value: 'disabled',
  description: 'Compile with libsoundio support (not operational).')

option (
  'want_clang_tidy',
  type: 'boolean',
  value: false,
  description: 'Whether we want the clang-tidy ninja targets. This is off by default because it causes long configuration times. Only useful for developers')

option (
  'bundled_plugins',
  type: 'boolean',
  value: true,
  description: 'Build and install bundled plugins.')

option (
  'fftw3_threads_separate',
  type: 'boolean',
  value: true,
  description: 'Whether to look for fftw3_threads pkgconfig files (or libs directly if not found) separate from the main fftw3 one.')

option (
  'fftw3_threads_separate_type',
  type: 'combo',
  choices: [ 'auto', 'dependency', 'library', ],
  value: 'auto',
  description: 'Method to look for separate fftw3_threads. Auto: look for dependency first and then library if not found.')

option (
  'fftw3f_separate',
  type: 'boolean',
  value: true,
  description: 'Whether to look for fftw3f separate of fftw3')

option (
  'build_plugins_with_static_libs',
  type: 'boolean',
  value: true,
  description: 'Whether to build bundled plugins with static libs (libgcc, libstdc++). Distros should turn this off.')
