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