[package]
name = "sixtyfps-rendering-backend-gl"
version = "0.0.5"
authors = ["SixtyFPS <info@sixtyfps.io>"]
edition = "2018"
license = "GPL-3.0-only"
description = "OpenGL rendering backend for SixtyFPS"
repository = "https://github.com/sixtyfpsui/sixtyfps"
homepage = "https://sixtyfps.io"


[lib]
path = "lib.rs"

[features]
x11 = ["winit/x11", "glutin/x11", "copypasta/x11"]
wayland = ["winit/wayland", "glutin/wayland", "copypasta/wayland"]
svg = ["resvg", "usvg", "tiny-skia"]
default = ["x11", "svg"]

[dependencies]
sixtyfps-corelib = { version = "=0.0.5", path = "../../corelib", features = ["femtovg_backend"] }
const-field-offset = { version = "0.1", path = "../../../helper_crates/const-field-offset" }
image = { version = "0.23.12", default-features = false }
rgb = "0.8"
imgref = "1.6.1"
vtable = { version = "0.1", path = "../../../helper_crates/vtable" }
by_address = "1.0.4"
femtovg = { version = "0.1.1" }
euclid = "0.22.1"
pin-weak = "1"
scoped-tls-hkt = "0.1"
smallvec = "1.4.1"
once_cell = "1.5"
lyon_path = "0.17"
copypasta = { version = "0.7.0", default-features = false }
fontdb = { version = "0.5.1", default-features = false }
resvg = { version= "0.13", optional = true, default-features = false }
usvg = { version= "0.13", optional = true, default-features = false }
tiny-skia = { version= "0.4.2", optional = true, default-features = false }

[target.'cfg(target_arch = "wasm32")'.dependencies]
web_sys = { version = "0.3", package = "web-sys", features=["console", "WebGlContextAttributes"] }
wasm-bindgen = { version = "0.2" }
winit = { version = "0.24", default-features = false, features = ["web-sys"] }
ttf-parser = "0.9"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
winit = { version = "0.24", default-features = false }
glutin = { version = "0.26", default-features = false }
glow = { version = "0.7.0", default-features = false }
font-kit = { version = "0.10", features = ["loader-freetype"] }

# Require font-config from the system. Issue #88 indicates that the copy provided by servo-fontconfig may be incompatible
# with distros at times.
[target.'cfg(not(any(target_family = "windows", target_os = "macos", target_os = "ios", target_arch = "wasm32")))'.dependencies]
servo-fontconfig = { version = "0.5", features = [ "force_system_lib" ] }

[target.'cfg(target_os = "macos")'.dependencies]
cocoa = { version = "0.24.0" }
core-text = { version = "19.1.0" }
core-foundation = { version = "0.9.1" }

