mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2025-01-11 03:21:32 +11:00
Updated gcc -> cc 1.0
This commit is contained in:
parent
5e16895b7d
commit
8d7eb6b000
|
@ -16,7 +16,7 @@ appveyor = { repository = "emoon/rust-minifb" }
|
||||||
travis-ci = { repository = "emoon/rust_minifb" }
|
travis-ci = { repository = "emoon/rust_minifb" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
gcc = "0.3.19"
|
cc = "1.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
time = "0.1.34"
|
time = "0.1.34"
|
||||||
|
|
15
build.rs
15
build.rs
|
@ -1,14 +1,17 @@
|
||||||
use std::env;
|
use std::env;
|
||||||
extern crate gcc;
|
extern crate cc;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let env = env::var("TARGET").unwrap();
|
let env = env::var("TARGET").unwrap();
|
||||||
if env.contains("darwin") {
|
if env.contains("darwin") {
|
||||||
gcc::compile_library("libminifb_native.a",
|
cc::Build::new()
|
||||||
&["src/native/macosx/MacMiniFB.m",
|
.file("src/native/macosx/MacMiniFB.m")
|
||||||
"src/native/macosx/OSXWindow.m",
|
.file("src/native/macosx/OSXWindow.m")
|
||||||
"src/native/macosx/OSXWindowFrameView.m"]); // MacOS
|
.file("src/native/macosx/OSXWindowFrameView.m")
|
||||||
|
.compile("libminifb_native.a");
|
||||||
} else if env.contains("linux") {
|
} else if env.contains("linux") {
|
||||||
gcc::compile_library("libminifb_native.a", &["src/native/x11/X11MiniFB.c"]); // Unix
|
cc::Build::new()
|
||||||
|
.file("src/native/x11/X11MiniFB.c")
|
||||||
|
.compile("libminifb_native.a");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue