Skip to content

Instantly share code, notes, and snippets.

@superdump
Created November 16, 2017 09:39
Show Gist options
  • Save superdump/d15e73e42858bd63250beda0ac0bc618 to your computer and use it in GitHub Desktop.
Save superdump/d15e73e42858bd63250beda0ac0bc618 to your computer and use it in GitHub Desktop.
diff --git a/Cargo.toml b/Cargo.toml
index c4ae846..587cc45 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,6 +15,7 @@ exclude = [
"benches/*",
"test.jpg"
]
+build = "build.rs"
[dependencies]
glium = "0.18.0"
@@ -23,6 +24,9 @@ nalgebra = "0.13.1"
image = "0.17.0"
owning_ref = "0.3.3"
+[build-dependencies]
+cc = "1.0"
+
[features]
default = []
glfwp5 = ["glfw"]
diff --git a/build.rs b/build.rs
new file mode 100644
index 0000000..bda7e85
--- /dev/null
+++ b/build.rs
@@ -0,0 +1,9 @@
+extern crate cc;
+
+fn main() {
+ if cfg!(target_os = "macos") {
+ cc::Build::new()
+ .file("pri.c")
+ .compile("pri");
+ }
+}
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment