Skip to content

Commit

Permalink
Update to use target_vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
simlay committed May 7, 2024
1 parent f804521 commit 78a773f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rustdoc-args = ["--cfg", "docsrs"]
vendored = ["openssl/vendored"]
alpn = ["security-framework/alpn"]

[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos", target_os = "tvos", target_os = "visionos"))'.dependencies]
[target.'cfg(target_vendor = "apple")'.dependencies]
security-framework = "2.0.0"
security-framework-sys = "2.0.0"
libc = "0.2"
Expand All @@ -25,7 +25,7 @@ tempfile = "3.1.0"
[target.'cfg(target_os = "windows")'.dependencies]
schannel = "0.1.17"

[target.'cfg(not(any(target_os = "windows", target_os = "macos", target_os = "ios", target_os = "watchos", target_os = "tvos", target_os = "visionos")))'.dependencies]
[target.'cfg(not(any(target_os = "windows", target_vendor = "apple")))'.dependencies]
log = "0.4.5"
openssl = "0.10.29"
openssl-sys = "0.9.55"
Expand Down
17 changes: 3 additions & 14 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,33 +105,22 @@ use std::io;
use std::result;

#[cfg(not(any(
target_os = "macos",
target_os = "windows",
target_os = "ios",
target_os = "watchos",
target_os = "tvos"
target_vendor = "apple",
)))]
#[macro_use]
extern crate log;
#[cfg(any(
target_os = "macos",
target_os = "ios",
target_os = "watchos",
target_os = "tvos",
target_os = "visionos"
target_vendor = "apple",
))]
#[path = "imp/security_framework.rs"]
mod imp;
#[cfg(target_os = "windows")]
#[path = "imp/schannel.rs"]
mod imp;
#[cfg(not(any(
target_os = "macos",
target_vendor = "apple",
target_os = "windows",
target_os = "ios",
target_os = "watchos",
target_os = "tvos",
target_os = "visionos"
)))]
#[path = "imp/openssl.rs"]
mod imp;
Expand Down

0 comments on commit 78a773f

Please sign in to comment.