Only add glutin dependency if you are using the glow backend (#2402)

This commit is contained in:
Emil Ernerfeldt 2022-12-06 14:29:58 +01:00 committed by GitHub
parent 9145893066
commit e30ac7f91a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,7 @@ dark-light = ["dep:dark-light"]
default_fonts = ["egui/default_fonts"]
## Use [`glow`](https://github.com/grovesNL/glow) for painting, via [`egui_glow`](https://github.com/emilk/egui/tree/master/crates/egui_glow).
glow = ["dep:glow", "egui_glow"]
glow = ["dep:glow", "dep:egui_glow", "dep:glutin"]
## Enable saving app state to disk.
persistence = [
@ -87,15 +87,6 @@ egui-winit = { version = "0.19.0", path = "../egui-winit", default-features = fa
"clipboard",
"links",
] }
# we can expose these to user so that they can select which backends they want to enable to avoid compiling useless deps.
# this can be done at the same time we expose x11/wayland features of winit crate.
glutin = { version = "0.30.0", features = [
"egl",
"glx",
"x11",
"wayland",
"wgl",
] }
raw-window-handle = { version = "0.5.0" }
winit = "0.27.2"
@ -105,6 +96,17 @@ directories-next = { version = "2", optional = true }
egui-wgpu = { version = "0.19.0", path = "../egui-wgpu", optional = true, features = [
"winit",
] } # if wgpu is used, use it with winit
# we can expose these to user so that they can select which backends they want to enable to avoid compiling useless deps.
# this can be done at the same time we expose x11/wayland features of winit crate.
glutin = { version = "0.30.0", optional = true, es = [
"egl",
"glx",
"x11",
"wayland",
"wgl",
] }
image = { version = "0.24", optional = true, default-features = false, features = [
"png",
] }