# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

[package]
name = "slint-build"
description = "Helper for Slint build script"
authors.workspace = true
edition = "2024"
homepage = "https://slint.rs"
keywords.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
categories = ["gui", "rendering::engine", "development-tools::build-utils"]

[lib]
path = "lib.rs"

[features]
default = []
## Enable the [`CompilerConfiguration::with_sdf_fonts`] function that encodes the font's glyphs as scalable signed distance fields, to reduce the size.
sdf-fonts = ["i-slint-compiler/sdf-fonts"]
## Enable this feature when building `.slint` libraries.
## This feature is experimental and may change or be removed in the future,
## enabling it implies opting out of [semver](https://semver.org).
## For details of this experiment, see: <https://github.com/slint-ui/slint/issues/7060>
experimental-module-builds = ["i-slint-compiler/experimental-library-module"]

[dependencies]
i-slint-compiler = { workspace = true, features = ["default", "rust", "display-diagnostics", "software-renderer", "bundle-translations"] }

spin_on = { workspace = true }
toml_edit = { workspace = true }
derive_more = { workspace = true, features = ["std", "error"] }

[target.'cfg(target_os = "linux")'.dependencies]
# Workaround cross compiling on linux where here in slint-build we depend on fontique through the software
# renderer compiler feature but fontconfig's build script find the target library via pkg-config and causes link errors
fontique = { workspace = true, features = ["fontconfig-dlopen"] }

[package.metadata.docs.rs]
features = ["sdf-fonts"]
rustdoc-args = ["--generate-link-to-definition"]
