From a7e14eb02dcb56098a9e2073a0523009c1f3ae5e Mon Sep 17 00:00:00 2001 From: John Colanduoni Date: Tue, 11 Jul 2017 19:44:57 -0700 Subject: [PATCH] Enable cargo doc/check on non-Darwin platforms --- core-foundation-sys/build.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core-foundation-sys/build.rs b/core-foundation-sys/build.rs index a1a0ea1..cdf6202 100644 --- a/core-foundation-sys/build.rs +++ b/core-foundation-sys/build.rs @@ -7,6 +7,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +use std::env; + fn main() { - println!("cargo:rustc-link-lib=framework=CoreFoundation"); + let target = env::var("TARGET").unwrap(); + + if target.ends_with("apple-darwin") || target.ends_with("apple-ios") { + println!("cargo:rustc-link-lib=framework=CoreFoundation"); + } }