mirror of
https://github.com/sotrh/learn-wgpu.git
synced 2024-11-16 06:12:55 +00:00
19 lines
502 B
Rust
19 lines
502 B
Rust
use anyhow::*;
|
|
use fs_extra::copy_items;
|
|
use fs_extra::dir::CopyOptions;
|
|
use std::env;
|
|
|
|
fn main() -> Result<()> {
|
|
// This tells cargo to rerun this script if something in /res/ changes.
|
|
println!("cargo:rerun-if-changed=res/*");
|
|
|
|
let out_dir = env::var("OUT_DIR")?;
|
|
let mut copy_options = CopyOptions::new();
|
|
copy_options.overwrite = true;
|
|
let mut paths_to_copy = Vec::new();
|
|
paths_to_copy.push("res/");
|
|
copy_items(&paths_to_copy, out_dir, ©_options)?;
|
|
|
|
Ok(())
|
|
}
|