From c9279804b759c3dbf7a126fdd4c5a731b6d88997 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 11 Mar 2021 13:41:03 -0600 Subject: [PATCH] Different approach. --- build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 6df6312..889acf1 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,5 @@ fn main() { + #[cfg(windows)] if std::env::var("TARGET").unwrap().contains("windows") { windows::build!( windows::foundation::{EventRegistrationToken, IAsyncOperation, TypedEventHandler}, @@ -7,7 +8,8 @@ fn main() { windows::media::speech_synthesis::{SpeechSynthesisStream, SpeechSynthesizer, SpeechSynthesizerOptions}, windows::storage::streams::IRandomAccessStream, ); - } else if std::env::var("TARGET").unwrap().contains("-apple") { + } + if std::env::var("TARGET").unwrap().contains("-apple") { println!("cargo:rustc-link-lib=framework=AVFoundation"); if !std::env::var("CARGO_CFG_TARGET_OS") .unwrap()