mirror of
https://github.com/lisk77/comet.git
synced 2025-10-23 21:38:50 +00:00
initial commit
This commit is contained in:
commit
6154c72b0e
55 changed files with 9481 additions and 0 deletions
29
build.rs
Normal file
29
build.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
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 /resources/ changes.
|
||||
println!("cargo:rerun-if-changed=resources/materials/*");
|
||||
println!("cargo:rerun-if-changed=resources/objects/*");
|
||||
println!("cargo:rerun-if-changed=resources/textures/*");
|
||||
println!("cargo:rerun-if-changed=resources/shaders/*");
|
||||
println!("cargo:rerun-if-changed=resources/data/*");
|
||||
println!("cargo:rerun-if-changed=resources/sounds/*");
|
||||
|
||||
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("resources/materials/");
|
||||
paths_to_copy.push("resources/objects/");
|
||||
paths_to_copy.push("resources/textures/");
|
||||
paths_to_copy.push("resources/shaders/");
|
||||
paths_to_copy.push("resources/data/");
|
||||
paths_to_copy.push("resources/sounds/");
|
||||
|
||||
copy_items(&paths_to_copy, out_dir, ©_options)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue