3
0
mirror of https://github.com/isar/rusqlite.git synced 2025-04-01 11:32:57 +08:00

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

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