# Copyright 2024-2026 the Cartero authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later

option(
    'profile',
    type: 'combo',
    choices: ['default', 'development'],
    value: 'default',
    description: 'The build profile for Cartero. One of "default" or "development".',
)

option(
    'decorations',
    type: 'combo',
    choices: ['csd', 'no-csd'],
    value: 'csd',
    description: 'Whether to use client side decorations. One of "csd" or "no-csd"',
)

# Package maintainers: this option is designed for the AppImage, Windows and macOS
# artifacts hosted at the project website. You might want to keep this feature
# disabled if the package manager or repository already manages updates on behalf
# of the user (true for Flathub, Snapcraft, AUR, and many others).
option(
    'app-updater',
    type: 'feature',
    value: 'disabled',
    description: 'Whether to enable in-app software update checker',
)

# These options are used to create valid binary distributions of Cartero when
# running the `install` target. They are only useful if you intend to
# distribute your own compiled versions of Cartero, as they deal with app
# signing. Check the releng docs for more information.
option(
    'appimage',
    type: 'feature',
    value: 'disabled',
    description: 'Whether to create an AppImage when installing',
)
option(
    'win32-bundle',
    type: 'feature',
    value: 'disabled',
    description: 'Whether to bundle all external dependencies when running the install target on Windows',
)
option(
    'win32-installer',
    type: 'feature',
    value: 'disabled',
    description: 'Whether to compile a Windows installer when running the install target on Windows',
)
option(
    'win32-sign-subject',
    type: 'string',
    value: '',
    description: 'When bundling for Windows, the subject name or a substring that will be passed to signtool if provided',
)
option(
    'macos-app',
    type: 'feature',
    value: 'disabled',
    description: 'Whether to create an .app when running the install target on macOS',
)
option(
    'macos-codesign-identity',
    type: 'string',
    value: '-',
    description: 'When creating an .app, the identity to use to sign the app',
)
option(
    'macos-notary-profile',
    type: 'string',
    value: '',
    description: 'When creating a .dmg, the keychain profile to use to notarize the app',
)
