From 03ea2602bc2f9a906ecd80087174d28c9f5417e3 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 2 Sep 2020 16:37:07 -0500 Subject: [PATCH] Don't link against AppKit if building on iOS. --- build.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/build.rs b/build.rs index eb44096..1aa98d1 100644 --- a/build.rs +++ b/build.rs @@ -1,15 +1,8 @@ -// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - fn main() { if std::env::var("TARGET").unwrap().contains("-apple") { - println!("cargo:rustc-link-lib=framework=AppKit"); println!("cargo:rustc-link-lib=framework=AVFoundation"); + if !std::env::var("CARGO_CFG_TARGET_OS").unwrap().contains("ios") { + println!("cargo:rustc-link-lib=framework=AppKit"); + } } }