Force linking against system sqlite libs

This commit introduces new env var, LIBSQLITE3_SYS_USE_PKG_CONFIG,
which can be set to non-zero values to force building against sqlite
libraries from the system overriding bundled features.
This commit is contained in:
icp 2023-04-17 01:23:40 +05:30
parent ef4ae94799
commit b4604f2421
No known key found for this signature in database

View File

@ -36,7 +36,11 @@ fn main() {
.expect("Could not copy bindings to output directory");
return;
}
if cfg!(all(
println!("cargo:rerun-if-env-changed=LIBSQLITE3_SYS_USE_PKG_CONFIG");
if env::var_os("LIBSQLITE3_SYS_USE_PKG_CONFIG").map_or(false, |s| s != "0") {
build_linked::main(&out_dir, &out_path);
} else if cfg!(all(
feature = "sqlcipher",
not(feature = "bundled-sqlcipher")
)) {