diff --git a/librocksdb-sys/build.rs b/librocksdb-sys/build.rs index 952d832..739ee8b 100644 --- a/librocksdb-sys/build.rs +++ b/librocksdb-sys/build.rs @@ -288,12 +288,16 @@ fn build_snappy() { } fn try_to_find_and_link_lib(lib_name: &str) -> bool { + println!("cargo:rerun-if-env-changed={}_COMPILE", lib_name); if let Ok(v) = env::var(&format!("{}_COMPILE", lib_name)) { if v.to_lowercase() == "true" || v == "1" { return false; } } + println!("cargo:rerun-if-env-changed={}_LIB_DIR", lib_name); + println!("cargo:rerun-if-env-changed={}_STATIC", lib_name); + if let Ok(lib_dir) = env::var(&format!("{}_LIB_DIR", lib_name)) { println!("cargo:rustc-link-search=native={}", lib_dir); let mode = match env::var_os(&format!("{}_STATIC", lib_name)) {