Skip to content

Commit

Permalink
Only add glutin dependency if you are using the glow backend (#2402)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Dec 6, 2022
1 parent 9145893 commit e30ac7f
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions crates/eframe/Cargo.toml
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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"

Expand All @@ -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",
] }
Expand Down

0 comments on commit e30ac7f

Please sign in to comment.