diff options
author | Alex Crichton <alex@alexcrichton.com> | 2015-07-31 17:30:10 -0700 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2015-07-31 17:30:10 -0700 |
commit | 57b4984102c2d050195161f0d4dda197d24ce309 (patch) | |
tree | 5c09db7a95bc970354325dd1131d4f203b910457 /libssh2-sys/build.rs | |
parent | 0b2330aad0b96db5834e78fbe0d6845aa668e607 (diff) | |
download | ssh2-rs-57b4984102c2d050195161f0d4dda197d24ce309.zip |
Fix LIBDIR
Diffstat (limited to 'libssh2-sys/build.rs')
-rw-r--r-- | libssh2-sys/build.rs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs index 95eb0fc..d264c56 100644 --- a/libssh2-sys/build.rs +++ b/libssh2-sys/build.rs @@ -15,7 +15,6 @@ fn main() { let mut cfg = cmake::Config::new("libssh2"); let target = env::var("TARGET").unwrap(); - let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); // Don't use OpenSSL on Windows, instead use the native Windows backend. if target.contains("windows") { @@ -44,14 +43,14 @@ fn main() { } } - cfg.define("BUILD_SHARED_LIBS", "OFF") - .define("ENABLE_ZLIB_COMPRESSION", "ON") - .define("CMAKE_INSTALL_LIBDIR", dst.join("lib")) - .define("BUILD_EXAMPLES", "OFF") - .define("BUILD_TESTING", "OFF") - .register_dep("OPENSSL") - .register_dep("Z") - .build(); + let dst = cfg.define("BUILD_SHARED_LIBS", "OFF") + .define("ENABLE_ZLIB_COMPRESSION", "ON") + .define("CMAKE_INSTALL_LIBDIR", "lib") + .define("BUILD_EXAMPLES", "OFF") + .define("BUILD_TESTING", "OFF") + .register_dep("OPENSSL") + .register_dep("Z") + .build(); if target.contains("windows") { println!("cargo:rustc-link-lib=ws2_32"); @@ -67,6 +66,5 @@ fn main() { println!("cargo:rustc-link-lib=static=ssh2"); } println!("cargo:rustc-link-search=native={}/lib", dst.display()); - println!("cargo:root={}", dst.display()); println!("cargo:include={}/include", dst.display()); } |