From 31d188e3130f7d522f929ba51d6408795651f72f Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Fri, 5 Dec 2014 06:43:18 -0800 Subject: [PATCH] Directly substitute $OPENSSL_PATH --- openssl-sys/src/build.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/openssl-sys/src/build.rs b/openssl-sys/src/build.rs index df284c0f..707a8e65 100644 --- a/openssl-sys/src/build.rs +++ b/openssl-sys/src/build.rs @@ -18,13 +18,11 @@ fn main() { flags.push_str(" -l gdi32 -l wsock32"); } - // Android doesn't have libcrypto/libssl, - // the toplevel Rust program should compile it themselves if target.find_str("android").is_some() { - os::getenv("OPENSSL_PATH").expect("Android does not provide openssl libraries, please \ - build them yourselves (instructions in the README) \ - and provide their location through $OPENSSL_PATH."); - flags.push_str(" -L ${OPENSSL_PATH}"); + let path = os::getenv("OPENSSL_PATH").expect("Android does not provide openssl libraries, please \ + build them yourselves (instructions in the README) \ + and provide their location through $OPENSSL_PATH."); + flags.push_str(format!(" -L {}", path).as_slice()); } println!("cargo:rustc-flags={}", flags);