fn main() {
    slint_build::compile("ui/demo.slint")
        .expect("slint-build: compile ui/demo.slint failed");

    // Auto-detect all .slint files and .svg icons for rerun detection
    for entry in glob::glob("ui/**/*.slint")
        .expect("glob: pattern failed")
        .chain(glob::glob("ui/icons/*.svg").expect("glob: icons failed"))
    {
        match entry {
            Ok(path) => println!("cargo:rerun-if-changed={}", path.display()),
            Err(e) => eprintln!("glob error: {}", e),
        }
    }
}
