From 01f49ef4cf727ca10a2714433234103656e544c7 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Tue, 21 May 2024 23:54:11 +0200 Subject: [PATCH] Use `target_vendor = "apple"` instead of many custom `target_os`es --- Cargo.toml | 4 ++-- src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bdbe472..18a9f50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 = [ @@ -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", ] } diff --git a/src/lib.rs b/src/lib.rs index 1e5b2d9..878082c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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)]