diff --git a/Cargo.toml b/Cargo.toml index 02a04e5..fb72c8d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ appveyor = { repository = "emoon/rust-minifb" } travis-ci = { repository = "emoon/rust_minifb" } [build-dependencies] -gcc = "0.3.19" +cc = "1.0" [dependencies] time = "0.1.34" diff --git a/build.rs b/build.rs index d5ed662..7cd23bd 100644 --- a/build.rs +++ b/build.rs @@ -1,14 +1,17 @@ use std::env; -extern crate gcc; +extern crate cc; 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 + 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") { - 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"); } }