learn-wgpu/code/beginner/tutorial9-models/build.rs

19 lines
502 B
Rust
Raw Normal View History

2020-09-11 04:45:32 +00:00
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();
2020-12-21 20:33:42 +00:00
paths_to_copy.push("res/");
2020-09-11 04:45:32 +00:00
copy_items(&paths_to_copy, out_dir, &copy_options)?;
Ok(())
2020-09-28 05:24:43 +00:00
}