2020-08-11 17:11:19 +00:00
|
|
|
fn main() {
|
2021-03-11 19:41:03 +00:00
|
|
|
#[cfg(windows)]
|
2021-03-11 19:21:41 +00:00
|
|
|
if std::env::var("TARGET").unwrap().contains("windows") {
|
|
|
|
windows::build!(
|
|
|
|
windows::foundation::{EventRegistrationToken, IAsyncOperation, TypedEventHandler},
|
|
|
|
windows::media::core::MediaSource,
|
|
|
|
windows::media::playback::{MediaPlaybackSession, MediaPlaybackState, MediaPlayer, MediaPlayerAudioCategory},
|
|
|
|
windows::media::speech_synthesis::{SpeechSynthesisStream, SpeechSynthesizer, SpeechSynthesizerOptions},
|
|
|
|
windows::storage::streams::IRandomAccessStream,
|
|
|
|
);
|
2021-03-11 19:41:03 +00:00
|
|
|
}
|
|
|
|
if std::env::var("TARGET").unwrap().contains("-apple") {
|
2020-08-13 16:08:00 +00:00
|
|
|
println!("cargo:rustc-link-lib=framework=AVFoundation");
|
2020-11-17 22:36:33 +00:00
|
|
|
if !std::env::var("CARGO_CFG_TARGET_OS")
|
|
|
|
.unwrap()
|
|
|
|
.contains("ios")
|
|
|
|
{
|
2020-09-02 21:37:07 +00:00
|
|
|
println!("cargo:rustc-link-lib=framework=AppKit");
|
|
|
|
}
|
2020-08-11 17:11:19 +00:00
|
|
|
}
|
|
|
|
}
|