Use rerun-if-env-changed in libsqlite3-sys

Fix #329
This commit is contained in:
gwenn 2018-04-06 22:27:07 +02:00
parent 2aebdeb46a
commit 9178e3f452

View File

@ -83,6 +83,11 @@ mod build {
fn find_sqlite() -> HeaderLocation { fn find_sqlite() -> HeaderLocation {
let link_lib = link_lib(); let link_lib = link_lib();
println!("cargo:rerun-if-env-changed={}_INCLUDE_DIR", env_prefix());
println!("cargo:rerun-if-env-changed={}_LIB_DIR", env_prefix());
if cfg!(target_os="windows") {
println!("cargo:rerun-if-env-changed=PATH");
}
// Allow users to specify where to find SQLite. // Allow users to specify where to find SQLite.
if let Ok(dir) = env::var(format!("{}_LIB_DIR", env_prefix())) { if let Ok(dir) = env::var(format!("{}_LIB_DIR", env_prefix())) {
println!("cargo:rustc-link-lib={}", link_lib); println!("cargo:rustc-link-lib={}", link_lib);