restrict all swift stuff to macos only (#590)

restrict all swift stuff to macos only
This commit is contained in:
Brendan Allan 2023-03-04 13:29:52 +08:00 committed by GitHub
parent d89240d9e2
commit 29a3123df5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,5 @@
fn main() {
#[cfg(target_os = "macos")]
swift_rs::SwiftLinker::new("10.15")
.with_package("sd-desktop-macos", "./")
.link();

View file

@ -1,3 +1,5 @@
#![cfg(target_os = "macos")]
use swift_rs::*;
pub type NSObject = *mut std::ffi::c_void;

View file

@ -1,7 +1,6 @@
use swift_rs::SwiftLinker;
fn main() {
SwiftLinker::new("10.15")
#[cfg(target_os = "macos")]
swift_rs::SwiftLinker::new("10.15")
.with_package("sd-macos", "./")
.link()
}

View file

@ -1,3 +1,5 @@
#![cfg(target_os = "macos")]
use swift_rs::*;
#[repr(C)]