commit d13187a4f1b4fce5076247169dc23ec07532d0ea parent 48ad8ecc417f6dba749f9c533bdcb9da2c158d99 Author: MTRNord <mtrnord1@gmail.com> Date: Sun, 8 Oct 2023 00:17:13 +0200 Dont link the json things on windows Diffstat:
| M | build.rs | | | 12 | +++++++----- |
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/build.rs b/build.rs @@ -8,11 +8,13 @@ fn main() { // Workaround weird jansson linking - let base = env!("CARGO_MANIFEST_DIR"); - let mut include_path = PathBuf::from(base); - include_path.push("build/jansson/lib"); + if !cfg!(target_os = "windows") { + let base = env!("CARGO_MANIFEST_DIR"); + let mut include_path = PathBuf::from(base); + include_path.push("build/jansson/lib"); - println!("cargo:rustc-link-search=native={}", include_path.display()); - println!("cargo:rustc-link-lib=static=jansson"); + println!("cargo:rustc-link-search=native={}", include_path.display()); + println!("cargo:rustc-link-lib=static=jansson"); + } napi_build::setup(); }