Skip to content

Commit

Permalink
Use target_vendor = "apple" instead of many custom target_oses
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Jul 15, 2024
1 parent c0fdb13 commit 01f49ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ash = { version = "0.38", optional = true, default-features = false, features =
egui = { version = ">=0.24, <=0.27", optional = true, default-features = false }
egui_extras = { version = ">=0.24, <=0.27", optional = true, default-features = false }

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
[target.'cfg(target_vendor = "apple")'.dependencies]
objc2 = { version = "0.5", default-features = false, optional = true }
objc2-foundation = { version = "0.2", default-features = false, optional = true }
objc2-metal = { version = "0.2.2", default-features = false, features = [
Expand Down Expand Up @@ -75,7 +75,7 @@ features = [
"Win32_Graphics_Dxgi_Common",
]

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dev-dependencies]
[target.'cfg(target_vendor = "apple")'.dev-dependencies]
objc2-metal = { version = "0.2.2", default-features = false, features = [
"MTLPixelFormat",
] }
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ pub mod vulkan;
#[cfg(all(windows, feature = "d3d12"))]
pub mod d3d12;

#[cfg(all(any(target_os = "macos", target_os = "ios"), feature = "metal"))]
#[cfg(all(target_vendor = "apple", feature = "metal"))]
pub mod metal;

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
Expand Down

0 comments on commit 01f49ef

Please sign in to comment.