From bdbef2003ff1942b0216fea33f0aaa2603d364b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Olgu=C3=ADn=20Mu=C3=B1oz?= Date: Tue, 12 Sep 2023 15:22:55 -0400 Subject: [PATCH] tweaks for ergonomic linking --- boring-sys/build.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/boring-sys/build.rs b/boring-sys/build.rs index 428eb4ee..6f039211 100644 --- a/boring-sys/build.rs +++ b/boring-sys/build.rs @@ -627,6 +627,10 @@ fn main() { "cargo:rustc-link-search=native={}/build/ssl/{}", bssl_dir, build_path ); + println!( + "cargo:rustc-link-search=native={}/lib/{}", + bssl_dir, build_path + ); } else { println!( "cargo:rustc-link-search=native={}/build/{}", @@ -642,6 +646,10 @@ fn main() { println!("cargo:rustc-link-lib=static=ssl"); let include_path = env::var("BORING_BSSL_INCLUDE_PATH").unwrap_or_else(|_| { + if let Ok(bssl_path) = env::var("BORING_BSSL_PATH") { + return format!("{}/include", bssl_path); + } + let src_path = get_boringssl_source_path(); if Path::new(&src_path).join("include").exists() {