rust_minifb/build.rs

17 lines
525 B
Rust
Raw Normal View History

2015-11-22 18:55:38 +01:00
use std::env;
2018-05-18 21:58:55 +02:00
extern crate cc;
2015-11-22 18:55:38 +01:00
fn main() {
let env = env::var("TARGET").unwrap();
if env.contains("darwin") {
2018-05-18 21:58:55 +02:00
cc::Build::new()
.flag("-mmacosx-version-min=10.10")
2018-05-18 21:58:55 +02:00
.file("src/native/macosx/MacMiniFB.m")
.file("src/native/macosx/OSXWindow.m")
.file("src/native/macosx/OSXWindowFrameView.m")
.compile("libminifb_native.a");
println!("cargo:rustc-link-lib=framework=Metal");
println!("cargo:rustc-link-lib=framework=MetalKit");
2015-11-22 18:55:38 +01:00
}
}