mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2024-12-23 19:31:30 +11:00
17 lines
643 B
Rust
17 lines
643 B
Rust
use std::env;
|
|
extern crate gcc;
|
|
|
|
fn main() {
|
|
let env = env::var("TARGET").unwrap();
|
|
if env.contains("darwin") {
|
|
gcc::compile_library("libminifb_native.a",
|
|
&["src/native/macosx/MacMiniFB.m",
|
|
"src/native/macosx/OSXWindow.m",
|
|
"src/native/macosx/OSXWindowFrameView.m"]); // MacOS
|
|
} else if env.contains("windows") {
|
|
gcc::compile_library("libminifb_native.a", &["src/native/windows/WinMiniFB.c"]); // Windows
|
|
} else {
|
|
gcc::compile_library("libminifb_native.a", &["src/native/x11/X11MiniFB.c"]); // Unix
|
|
}
|
|
}
|