From 589613c1c1966304bfebe6893a7b5a6ca34471f3 Mon Sep 17 00:00:00 2001 From: LeadRDRK Date: Sat, 17 Feb 2024 10:27:22 +0700 Subject: [PATCH] [rust] Remove explicit link search path for non-windows --- bindings/rust/build.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs index a7bdd579..e8c4b860 100644 --- a/bindings/rust/build.rs +++ b/bindings/rust/build.rs @@ -1,11 +1,8 @@ use std::env; fn main() { - let lib_path = if cfg!(windows) { - format!("{}{}", env::var("ProgramFiles").unwrap(), "\\libmem\\lib") - } else { - String::from("/usr/lib") + if cfg!(windows) { + let lib_path = format!("{}{}", env::var("ProgramFiles").unwrap(), "\\libmem\\lib"); + println!("cargo:rustc-link-search={}", lib_path); }; - - println!("cargo:rustc-link-search={}", lib_path); }