rust_minifb/build.rs

18 lines
513 B
Rust
Raw Normal View History

2015-11-23 04:55:38 +11:00
use std::env;
2018-05-19 05:58:55 +10:00
extern crate cc;
2015-11-23 04:55:38 +11:00
fn main() {
let env = env::var("TARGET").unwrap();
if env.contains("darwin") {
2018-05-19 05:58:55 +10:00
cc::Build::new()
.file("src/native/macosx/MacMiniFB.m")
.file("src/native/macosx/OSXWindow.m")
.file("src/native/macosx/OSXWindowFrameView.m")
.compile("libminifb_native.a");
} else if env.contains("linux") {
2018-05-19 05:58:55 +10:00
cc::Build::new()
.file("src/native/x11/X11MiniFB.c")
.compile("libminifb_native.a");
2015-11-23 04:55:38 +11:00
}
}