2018-06-10 16:52:21 +03:00
|
|
|
use std::process::Command;
|
|
|
|
|
|
|
|
fn main() {
|
2018-06-10 19:17:50 +03:00
|
|
|
let mut rc = Command::new(".\\tools\\rc.exe")
|
|
|
|
.arg("/r")
|
|
|
|
.arg("/fo")
|
|
|
|
.arg(".\\resources\\resources.lib")
|
|
|
|
.arg(".\\resources\\resources.rc")
|
|
|
|
.spawn()
|
|
|
|
.expect("Failed to spawn resource compiler");
|
2018-06-10 16:52:21 +03:00
|
|
|
|
2018-06-10 19:17:50 +03:00
|
|
|
let ecode = rc
|
|
|
|
.wait()
|
|
|
|
.expect("Failed to wait on resource compiler");
|
2018-06-10 16:52:21 +03:00
|
|
|
|
2018-06-10 19:17:50 +03:00
|
|
|
assert!(ecode.success(), "Resource compiler failed");
|
2018-06-10 16:52:21 +03:00
|
|
|
|
2018-06-10 19:17:50 +03:00
|
|
|
println!("cargo:rustc-link-lib=static=.\\resources\\resources");
|
2018-06-10 16:52:21 +03:00
|
|
|
}
|