mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-11 14:59:38 +00:00
22 lines
891 B
Rust
22 lines
891 B
Rust
fn main() {
|
|
#[cfg(windows)]
|
|
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::SpeechSynthesis::{SpeechSynthesisStream, SpeechSynthesizer, SpeechSynthesizerOptions},
|
|
Windows::Storage::Streams::IRandomAccessStream,
|
|
);
|
|
}
|
|
if std::env::var("TARGET").unwrap().contains("-apple") {
|
|
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");
|
|
}
|
|
}
|
|
}
|