From f5784366f93434e891c59496eb186e581d2f52ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Cig=C3=A1nek?= Date: Mon, 11 Sep 2023 15:25:04 +0200 Subject: [PATCH] bindgen: Make env_logger optional --- bindgen/Cargo.toml | 2 +- bindgen/src/main.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bindgen/Cargo.toml b/bindgen/Cargo.toml index 6042d67d9..68292ef3a 100644 --- a/bindgen/Cargo.toml +++ b/bindgen/Cargo.toml @@ -14,4 +14,4 @@ path = "src/main.rs" [dependencies] cbindgen = "0.20.0" -env_logger = "0.10.0" +env_logger = { version = "0.10.0", optional = true } diff --git a/bindgen/src/main.rs b/bindgen/src/main.rs index 703b0b550..baf97503e 100644 --- a/bindgen/src/main.rs +++ b/bindgen/src/main.rs @@ -4,6 +4,7 @@ use std::path::Path; fn main() -> Result<(), Box> { // Generate the C bindings header + #[cfg(feature = "env_logger")] env_logger::init(); let output_path = Path::new("target").join("bindings.h");