summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-07-31 16:09:54 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-07-31 16:09:54 -0700
commit9cf802cbee184e06206ba30ea3daef501de13836 (patch)
treef8237d9113dd362c6e35d52fd728387ea39488a9
parentd60ee62c702be5b07a3ebc575f8f0b66b85def2c (diff)
downloadssh2-rs-9cf802cbee184e06206ba30ea3daef501de13836.zip
Don't require zlib on msvc
-rw-r--r--libssh2-sys/build.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs
index ae1ea1c..f6602de 100644
--- a/libssh2-sys/build.rs
+++ b/libssh2-sys/build.rs
@@ -28,8 +28,9 @@ fn main() {
} else {
cfg.define("CRYPTO_BACKEND", "OpenSSL");
}
+ let zlib = if target.contains("msvc") {"OFF"} else {"ON"};
cfg.define("BUILD_SHARED_LIBS", "OFF")
- .define("ENABLE_ZLIB_COMPRESSION", "ON")
+ .define("ENABLE_ZLIB_COMPRESSION", zlib)
.define("CMAKE_INSTALL_LIBDIR", dst.join("lib"))
.define("BUILD_EXAMPLES", "OFF")
.define("BUILD_TESTING", "OFF")