aboutsummaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/build.rs b/build.rs
index 875e8c6..bef02ed 100644
--- a/build.rs
+++ b/build.rs
@@ -5,6 +5,11 @@ use std::process::Command;
fn main() {
println!("cargo:rerun-if-changed=data/tc.mal.lleap.gschema.xml");
+ compile_schemas();
+ bundle_icons();
+}
+
+fn compile_schemas() {
let out_dir = env::var("OUT_DIR").unwrap();
let schema_dir = Path::new(&out_dir).join("glib-2.0").join("schemas");
@@ -26,3 +31,20 @@ fn main() {
schema_dir.display()
);
}
+
+fn bundle_icons() {
+ relm4_icons_build::bundle_icons(
+ // Name of the file that will be generated at `OUT_DIR`
+ "icon_names.rs",
+ // Optional app ID
+ Some("tc.mal.lleap"),
+ // Custom base resource path:
+ // * defaults to `/com/example/myapp` in this case if not specified explicitly
+ // * or `/org/relm4` if app ID was not specified either
+ None::<&str>,
+ // Directory with custom icons (if any)
+ None::<&str>,
+ // List of icons to include
+ ["settings", "play-large", "pause-large", "subtitles"],
+ );
+}