summaryrefslogtreecommitdiff
path: root/libssh2-sys
diff options
context:
space:
mode:
Diffstat (limited to 'libssh2-sys')
-rw-r--r--libssh2-sys/build.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs
index b8509e8..df9a0f2 100644
--- a/libssh2-sys/build.rs
+++ b/libssh2-sys/build.rs
@@ -18,11 +18,13 @@ fn main() {
register_dep("Z");
register_dep("OPENSSL");
- if let Ok(lib) = pkg_config::find_library("libssh2") {
- for path in &lib.include_paths {
- println!("cargo:include={}", path.display());
+ if env::var("LIBSSH2_SYS_USE_PKG_CONFIG").is_ok() {
+ if let Ok(lib) = pkg_config::find_library("libssh2") {
+ for path in &lib.include_paths {
+ println!("cargo:include={}", path.display());
+ }
+ return
}
- return
}
if !Path::new("libssh2/.git").exists() {