docs: define windows targets

This commit is contained in:
chyyran 2023-01-14 19:05:15 -05:00
parent e320e093e2
commit 45e5de0f21
7 changed files with 21 additions and 4 deletions

View file

@ -47,3 +47,6 @@ optional = true
[package.metadata.cargo-post.dependencies] [package.metadata.cargo-post.dependencies]
cbindgen = { git = "https://github.com/eqrion/cbindgen" } cbindgen = { git = "https://github.com/eqrion/cbindgen" }
[package.metadata.docs.rs]
targets = ["x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu"]

View file

@ -24,7 +24,7 @@ ash = { version = "0.37.1+1.3.235", optional = true }
num-traits = "0.2.15" num-traits = "0.2.15"
[dependencies.windows] [target.'cfg(windows)'.dependencies.windows]
optional = true optional = true
version = "0.43.0" version = "0.43.0"
features = [ features = [
@ -33,3 +33,6 @@ features = [
"Win32_Graphics_Direct3D", "Win32_Graphics_Direct3D",
"Win32_Graphics_Direct3D11", "Win32_Graphics_Direct3D11",
] ]
[package.metadata.docs.rs]
targets = ["x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu"]

View file

@ -7,11 +7,11 @@ pub mod gl;
pub mod vk; pub mod vk;
/// DXGI common conversions. /// DXGI common conversions.
#[cfg(feature = "dxgi")] #[cfg(all(target_os = "windows", feature = "dxgi"))]
pub mod dxgi; pub mod dxgi;
/// Direct3D 11 common conversions. /// Direct3D 11 common conversions.
#[cfg(feature = "d3d11")] #[cfg(all(target_os = "windows", feature = "d3d11"))]
pub mod d3d11; pub mod d3d11;
mod viewport; mod viewport;

View file

@ -41,3 +41,7 @@ features = [
[dev-dependencies] [dev-dependencies]
gfx-maths = "0.2.8" gfx-maths = "0.2.8"
[package.metadata.docs.rs]
default-target = "x86_64-pc-windows-msvc"
targets = []

View file

@ -25,3 +25,6 @@ thiserror = "1.0.37"
[dev-dependencies] [dev-dependencies]
glfw = "0.47.0" glfw = "0.47.0"
[package.metadata.docs.rs]
targets = ["x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu"]

View file

@ -32,3 +32,5 @@ winit = "0.27.5"
raw-window-handle = "0.5" raw-window-handle = "0.5"
ash-window = "0.12.0" ash-window = "0.12.0"
[package.metadata.docs.rs]
targets = ["x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu"]

View file

@ -22,7 +22,6 @@ librashader-runtime-d3d11 = { path = "../librashader-runtime-d3d11", version =
librashader-runtime-gl = { path = "../librashader-runtime-gl", version = "0.1.0-beta.2", optional = true } librashader-runtime-gl = { path = "../librashader-runtime-gl", version = "0.1.0-beta.2", optional = true }
librashader-runtime-vk = { path = "../librashader-runtime-vk", version = "0.1.0-beta.2", optional = true } librashader-runtime-vk = { path = "../librashader-runtime-vk", version = "0.1.0-beta.2", optional = true }
ash = { version = "0.37.1+1.3.235", optional = true } ash = { version = "0.37.1+1.3.235", optional = true }
[target.'cfg(windows)'.dependencies.windows] [target.'cfg(windows)'.dependencies.windows]
@ -41,3 +40,6 @@ runtime = []
reflect = [] reflect = []
preprocess = [] preprocess = []
presets = [] presets = []
[package.metadata.docs.rs]
targets = ["x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu"]