1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-12-02 14:29:37 +00:00
tts-rs/build.rs

20 lines
873 B
Rust
Raw Normal View History

fn main() {
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,
);
} else if std::env::var("TARGET").unwrap().contains("-apple") {
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")
{
println!("cargo:rustc-link-lib=framework=AppKit");
}
}
}