mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 19:41:37 +08:00
only depend on vcpkg for cfg(target_env = "msvc")
This commit is contained in:
parent
0dd10f85ba
commit
b3faed0f75
@ -25,4 +25,6 @@ min_sqlite_version_3_7_16 = ["pkg-config", "vcpkg"]
|
|||||||
bindgen = { version = "0.21", optional = true }
|
bindgen = { version = "0.21", optional = true }
|
||||||
pkg-config = { version = "0.3", optional = true }
|
pkg-config = { version = "0.3", optional = true }
|
||||||
gcc = { version = "0.3", optional = true }
|
gcc = { version = "0.3", optional = true }
|
||||||
|
|
||||||
|
[target.'cfg(target_env = "msvc")'.build-dependencies]
|
||||||
vcpkg = { version = "0.2", optional = true }
|
vcpkg = { version = "0.2", optional = true }
|
||||||
|
@ -42,7 +42,7 @@ mod build {
|
|||||||
mod build {
|
mod build {
|
||||||
extern crate pkg_config;
|
extern crate pkg_config;
|
||||||
|
|
||||||
#[cfg(feature = "vcpkg")]
|
#[cfg(all(feature = "vcpkg", target_env = "msvc"))]
|
||||||
extern crate vcpkg;
|
extern crate vcpkg;
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
@ -107,7 +107,7 @@ mod build {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "vcpkg")]
|
#[cfg(all(feature = "vcpkg", target_env = "msvc"))]
|
||||||
fn try_vcpkg() -> Option<HeaderLocation> {
|
fn try_vcpkg() -> Option<HeaderLocation> {
|
||||||
// See if vcpkg can find it.
|
// See if vcpkg can find it.
|
||||||
if let Ok(mut lib) = vcpkg::Config::new().probe("sqlite3") {
|
if let Ok(mut lib) = vcpkg::Config::new().probe("sqlite3") {
|
||||||
@ -119,7 +119,7 @@ mod build {
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "vcpkg"))]
|
#[cfg(not(all(feature = "vcpkg", target_env = "msvc")))]
|
||||||
fn try_vcpkg() -> Option<HeaderLocation> {
|
fn try_vcpkg() -> Option<HeaderLocation> {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user