pub glib-build-tools behind gtk feature flag

This commit is contained in:
Ferdinand Schober
2024-04-15 10:14:48 +02:00
parent e537cdbc7e
commit 36855a1a17
2 changed files with 3 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ windows = { version = "0.54.0", features = [
] }
[build-dependencies]
glib-build-tools = "0.19.0"
glib-build-tools = { version = "0.19.0", optional = true }
[features]
default = ["wayland", "x11", "xdg_desktop_portal", "libei", "gtk"]
@@ -70,4 +70,4 @@ wayland = ["dep:wayland-client", "dep:wayland-protocols", "dep:wayland-protocols
x11 = ["dep:x11"]
xdg_desktop_portal = ["dep:ashpd"]
libei = ["dep:reis", "dep:ashpd"]
gtk = ["dep:gtk", "dep:adw", "dep:async-channel"]
gtk = ["dep:gtk", "dep:adw", "dep:async-channel", "dep:glib-build-tools"]

View File

@@ -1,5 +1,6 @@
fn main() {
// composite_templates
#[cfg(feature = "gtk")]
glib_build_tools::compile_resources(
&["resources"],
"resources/resources.gresource.xml",