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

[package]
name = "i-slint-common"
description = "Helper crate for sharing code & data structures between i-slint-core and slint-compiler"
authors.workspace = true
documentation.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
path = "lib.rs"

[features]
default = []
shared-fontdb = ["dep:fontdb", "dep:libloading", "derive_more", "cfg-if"]

[dependencies]
fontdb = { workspace = true, optional = true }
derive_more = { version = "0.99.5", optional = true }
cfg-if = { version = "1", optional = true }

[target.'cfg(not(any(target_family = "windows", target_os = "macos", target_os = "ios", target_arch = "wasm32", target_os = "android")))'.dependencies]
libloading = { version = "0.8.0", optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
fontdb = { workspace = true, optional = true, default-features = true }
