From 8d7eb6b000bb46f09fdfc69527e3e143e14f6ae6 Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Fri, 18 May 2018 21:58:55 +0200 Subject: [PATCH] Updated gcc -> cc 1.0 --- Cargo.toml | 2 +- build.rs | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) 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"); } }