Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
wooden-worm committed Nov 6, 2021
0 parents commit 5316318
Show file tree
Hide file tree
Showing 4 changed files with 651 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
Cargo.lock
11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "tao-foundation"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
objc = "0.2.7"
objc-derive = {git = "https://github.com/wooden-worm/objc-derive"}
block = "0.1.6"
29 changes: 29 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
fn main() {
let target = std::env::var("TARGET").unwrap();

println!("cargo:rustc-link-lib=framework=Foundation");

if target.contains("-ios") {
println!("cargo:rustc-link-lib=framework=UIKit");
println!("cargo:rustc-link-lib=framework=StoreKit");
} else if target.contains("-macos") {
println!("cargo:rustc-link-lib=framework=AppKit");
println!("cargo:rustc-link-lib=framework=StoreKit");
}

println!("cargo:rustc-link-lib=framework=CoreGraphics");
println!("cargo:rustc-link-lib=framework=QuartzCore");
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");

#[cfg(feature = "quicklook")]
println!("cargo:rustc-link-lib=framework=QuickLook");
}
Loading

0 comments on commit 5316318

Please sign in to comment.