Expose the include directory of the bundled sqlite version

This commit exposes the include directory of the bundled sqlite version
via by instructing cargo to set the `DEP_SQLITE3_INCLUDE` enviroment
variable as documented in the cargo book:
https://doc.rust-lang.org/cargo/reference/build-script-examples.html#using-another-sys-crate

This enables other sys crates to rely on the bundled sqlite version and
use it as base for their compilation if they have a (sub-)dependency on
libsqlite3.
This commit is contained in:
Georg Semmler 2024-01-25 11:39:21 +01:00
parent ccfbc28ae1
commit e60d993cc4
No known key found for this signature in database
GPG Key ID: A87BCEE5205CE489

View File

@ -114,6 +114,7 @@ mod build_bundled {
{
super::copy_bindings(lib_name, "bindgen_bundled_version", out_path);
}
println!("cargo:include={}/{lib_name}", env!("CARGO_MANIFEST_DIR"));
println!("cargo:rerun-if-changed={lib_name}/sqlite3.c");
println!("cargo:rerun-if-changed=sqlite3/wasm32-wasi-vfs.c");
let mut cfg = cc::Build::new();