From fb25b7fd5cdf0d94f430dcf7614da1dfbe526ed7 Mon Sep 17 00:00:00 2001 From: oberrich <6305520+oberrich@users.noreply.github.com> Date: Tue, 9 Apr 2024 02:25:04 +0200 Subject: [PATCH] attempt to fix doc build --- Cargo.lock | 2 +- Cargo.toml | 4 ++-- src/build.rs | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0a290f4..8573d5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -297,7 +297,7 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "phnt" -version = "0.0.7" +version = "0.0.8" dependencies = [ "bindgen", "chrono", diff --git a/Cargo.toml b/Cargo.toml index d9c4747..f788618 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "phnt" -version = "0.0.7" +version = "0.0.8" license = "MIT" authors = ["oberrich "] repository = "https://github.com/oberrich/phnt-rs" @@ -13,7 +13,7 @@ description = "Rust bindings to the System Informer's (formerly known as Process [package.metadata.docs.rs] all-features = true default-target = "x86_64-pc-windows-msvc" -targets = ["x86_64-pc-windows-msvc"] +targets = [] [build-dependencies] windows.features = ["Win32_Foundation"] diff --git a/src/build.rs b/src/build.rs index af6dc30..76131c6 100644 --- a/src/build.rs +++ b/src/build.rs @@ -119,6 +119,11 @@ fn main() { "\\deps\\phnt-nightly" )); + if cfg!(doc) { + println!("Skipping regeneration of bindings for docs."); + return; + } + let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("generated.rs"); BindgenConfig::default()