# global

option(
  'lto',
  type: 'combo',
  choices: ['true', 'false', 'auto'],
  value: 'auto',
  description: 'Control link time optimizations. The "auto" options enables LTO on x86_64 and aarch64 only. Other platforms often do not provide enough memory.',
)

option(
  'profile',
  type: 'combo',
  choices: ['release', 'dev'],
  value: 'release',
)

# glycin loaders

option(
  'glycin-loaders',
  type: 'boolean',
  description: 'Build loaders',
)

option(
  'loaders',
  type: 'array',
  choices: [
    'glycin-heif',
    'glycin-image-rs',
    'glycin-jpeg2000',
    'glycin-jxl',
    'glycin-raw',
    'glycin-svg',
  ],
  value: [
    'glycin-heif',
    'glycin-image-rs',
    'glycin-jxl',
    'glycin-svg',
  ],
  description: 'List of loaders to build. Only has an effect if "glycin-loaders" is enabled.',
)

option(
  'tests',
  type: 'boolean',
  description: 'Support running tests.',
)

option(
  'test_skip_ext',
  type: 'array',
  description: 'Image filename extensions, exlcuding dots, to skip during tests.',
)

option(
  'test_tokio',
  type: 'boolean',
  description: 'Also run tests with tokio if tests are enabled.',
)

option(
  'test_skip_install',
  type: 'boolean',
  value: false,
  description: 'Do not run meson install before running tests.',
)

option(
  'test_log_level',
  type: 'combo',
  choices: ['error', 'warn', 'info', 'debug', 'trace'],
  value: 'warn',
  description: 'Output log messages of the specified level during tests.',
)

# libglycin

option(
  'libglycin',
  type: 'boolean',
  description: 'Build libglycin C bindings for the glycin crate',
)

option(
  'libglycin-gtk4',
  type: 'boolean',
  description: 'Build libglycin-gtk4 C bindings with contain GTK 4 dependent functions. If "libglycin" is disabled, this links to an installed libglycin library.',
)

option(
  'introspection',
  type: 'boolean',
  description: 'Generate .gir and .typelib files',
)

option(
  'vapi',
  type: 'boolean',
  description: 'Generate .vapi files for the Vala language',
)

option(
  'capi_docs',
  type: 'boolean',
  value: false,
  description: 'Generate HTML documentation for C API',
)

option(
  'python_tests',
  type: 'boolean',
  value: false,
  description: 'Test python bindings. Needs python3-gi',
)

# thumbnailer

option(
  'glycin-thumbnailer',
  type: 'boolean',
  description: 'Build thumbnailer',
)
