2020-02-28 13:34:34 +11:00
|
|
|
//! Specifies various frameworks to link against. Note that this is something where you probably
|
|
|
|
//! only want to be compiling this project on macOS. ;P
|
|
|
|
//!
|
|
|
|
//! (it checks to see if it's macOS before emitting anything, but still)
|
|
|
|
|
|
|
|
fn main() {
|
2020-04-01 19:04:34 +11:00
|
|
|
let target = std::env::var("TARGET").unwrap();
|
2020-03-18 10:55:09 +11:00
|
|
|
|
2020-04-01 19:04:34 +11:00
|
|
|
println!("cargo:rustc-link-lib=framework=Foundation");
|
|
|
|
|
|
|
|
if std::env::var("TARGET").unwrap().contains("-ios") {
|
|
|
|
println!("cargo:rustc-link-lib=framework=UIKit");
|
|
|
|
} else {
|
|
|
|
println!("cargo:rustc-link-lib=framework=AppKit");
|
|
|
|
}
|
2020-03-18 13:11:03 +11:00
|
|
|
|
2020-04-01 19:04:34 +11:00
|
|
|
println!("cargo:rustc-link-lib=framework=CoreGraphics");
|
|
|
|
println!("cargo:rustc-link-lib=framework=QuartzCore");
|
2020-03-17 16:08:12 +11:00
|
|
|
|
2020-04-01 19:04:34 +11:00
|
|
|
println!("cargo:rustc-link-lib=framework=Security");
|
|
|
|
|
|
|
|
#[cfg(feature = "webview")]
|
|
|
|
println!("cargo:rustc-link-lib=framework=WebKit");
|
|
|
|
|
|
|
|
#[cfg(feature = "cloudkit")]
|
|
|
|
println!("cargo:rustc-link-lib=framework=CloudKit");
|
|
|
|
|
|
|
|
#[cfg(feature = "user-notifications")]
|
|
|
|
println!("cargo:rustc-link-lib=framework=UserNotifications");
|
2020-02-28 13:34:34 +11:00
|
|
|
}
|