mirror of
https://github.com/mii443/rust-openvr.git
synced 2025-12-09 13:58:22 +00:00
lipo for osx
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use std::io::Command;
|
||||
#[cfg(target_os = "linux")]
|
||||
use std::io::fs;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
@@ -23,9 +24,13 @@ fn main() {
|
||||
.arg("build")
|
||||
.status()
|
||||
.ok().expect("Failed to build");
|
||||
fs::copy(&Path::new("modules/oculus_sdk_mac/LibOVR/Lib/MacOS/Release/libovr.a"),
|
||||
&Path::new(env!("OUT_DIR")).join(Path::new("libovr.a")))
|
||||
.ok().expect("Failed to move file");
|
||||
Command::new("lipo")
|
||||
.arg("modules/oculus_sdk_mac/LibOVR/Lib/MacOS/Release/libovr.a")
|
||||
.arg("-thin")
|
||||
.arg("x86_64")
|
||||
.arg("-output")
|
||||
.arg(Path::new(env!("OUT_DIR")).join(Path::new("libovr.a")).as_str().unwrap())
|
||||
.status()
|
||||
.ok().expect("Failed to lipo library");
|
||||
println!("cargo:rustc-flags=-L {} -l ovr:static", env!("OUT_DIR"));
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user