fix: handle PATH the right way and fix .build.env example for windows
This commit is contained in:
parent
c462442221
commit
571da52888
@ -1,3 +1,3 @@
|
||||
SESAM_FSV_VERSION=1.40.13
|
||||
SESAM_FSV_LIB_PATH=C:/Program Files/santesocial/fsv/${SESAM_FSV_VERSION}/lib
|
||||
SESAM_FSV_LIB_PATH="C:/Program Files/santesocial/fsv/${SESAM_FSV_VERSION}/lib"
|
||||
SESAM_FSV_SSVLIB=ssvw64
|
||||
|
5
build.rs
5
build.rs
@ -5,6 +5,7 @@ use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
dotenv::from_filename(".env.build").ok();
|
||||
println!("cargo::rerun-if-changed=.env.build");
|
||||
|
||||
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
|
||||
@ -17,10 +18,8 @@ fn main() {
|
||||
println!("cargo::rustc-link-lib=dylib={}", env::var("SESAM_FSV_SSVLIB").unwrap());
|
||||
|
||||
if cfg!(target_os = "windows") {
|
||||
// Get PATH value
|
||||
let path = env::var("PATH").unwrap_or(String::new());
|
||||
println!("PATH={}", path);
|
||||
println!("cargo:rustc-env=PATH={}", fsv_lib_path.display());
|
||||
println!("cargo:rustc-env=PATH={};{}", fsv_lib_path.display(), path);
|
||||
} else if cfg!(target_os = "linux") {
|
||||
println!("cargo:rustc-env=LD_LIBRARY_PATH={}", fsv_lib_path.display());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user