mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-22 16:29:20 +08:00
Merge pull request #483 from technic/master
Clarify instruction for building with vcpkg
This commit is contained in:
commit
b24f3c5519
@ -131,8 +131,10 @@ You can adjust this behavior in a number of ways:
|
|||||||
* Installing the sqlite3 development packages will usually be all that is required, but
|
* Installing the sqlite3 development packages will usually be all that is required, but
|
||||||
the build helpers for [pkg-config](https://github.com/alexcrichton/pkg-config-rs)
|
the build helpers for [pkg-config](https://github.com/alexcrichton/pkg-config-rs)
|
||||||
and [vcpkg](https://github.com/mcgoo/vcpkg-rs) have some additional configuration
|
and [vcpkg](https://github.com/mcgoo/vcpkg-rs) have some additional configuration
|
||||||
options. The default when using vcpkg is to dynamically link. `vcpkg install sqlite3:x64-windows` will install the required library.
|
options. The default when using vcpkg is to dynamically link,
|
||||||
|
which must be enabled by setting `VCPKGRS_DYNAMIC=1` environment variable before build.
|
||||||
|
`vcpkg install sqlite3:x64-windows` will install the required library.
|
||||||
|
|
||||||
### Binding generation
|
### Binding generation
|
||||||
|
|
||||||
We use [bindgen](https://crates.io/crates/bindgen) to generate the Rust
|
We use [bindgen](https://crates.io/crates/bindgen) to generate the Rust
|
||||||
|
@ -132,6 +132,9 @@ mod build {
|
|||||||
if cfg!(target_os = "windows") {
|
if cfg!(target_os = "windows") {
|
||||||
println!("cargo:rerun-if-env-changed=PATH");
|
println!("cargo:rerun-if-env-changed=PATH");
|
||||||
}
|
}
|
||||||
|
if cfg!(all(feature = "vcpkg", target_env = "msvc")) {
|
||||||
|
println!("cargo:rerun-if-env-changed=VCPKGRS_DYNAMIC");
|
||||||
|
}
|
||||||
// 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())) {
|
||||||
// Try to use pkg-config to determine link commands
|
// Try to use pkg-config to determine link commands
|
||||||
|
Loading…
Reference in New Issue
Block a user