update build.rs to latest stdlib

This commit is contained in:
Colin Sherratt
2015-03-22 15:27:03 -04:00
parent a74be907fc
commit 76b4fb41b0

View File

@ -1,14 +1,13 @@
use std::old_io::Command;
use std::old_io::process::StdioContainer;
use std::path::Path;
use std::process::Command;
#[cfg(target_os = "linux")]
use std::old_io::fs;
use std::fs;
#[cfg(target_os = "linux")]
fn main() {
Command::new("make")
.arg("-C").arg("modules/oculus_sdk_linux/")
.stdout(StdioContainer::InheritFd(1))
.stderr(StdioContainer::InheritFd(2))
.status()
.ok().expect("Failed to build");
fs::copy(&Path::new("modules/oculus_sdk_linux/LibOVR/Lib/Linux/Release/x86_64/libovr.a"),
@ -25,8 +24,6 @@ fn main() {
.arg("-project")
.arg("modules/oculus_sdk_mac/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj")
.arg("build")
.stdout(StdioContainer::InheritFd(1))
.stderr(StdioContainer::InheritFd(2))
.status()
.ok().expect("Failed to build");
Command::new("lipo")
@ -35,8 +32,6 @@ fn main() {
.arg("x86_64")
.arg("-output")
.arg(Path::new(env!("OUT_DIR")).join(Path::new("libovr.a")).as_str().unwrap())
.stdout(StdioContainer::InheritFd(1))
.stderr(StdioContainer::InheritFd(2))
.status()
.ok().expect("Failed to lipo library");
println!("cargo:rustc-flags=-L {} -l ovr:static", env!("OUT_DIR"));