From 67f955c81d15edcd65e5bc4cfba914094081a049 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 30 Jan 2024 08:55:57 -0600 Subject: [PATCH] rebuild openssl-sys if the underlying openssl has changed --- openssl-sys/build/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openssl-sys/build/main.rs b/openssl-sys/build/main.rs index 692ff72508..2dc157d66e 100644 --- a/openssl-sys/build/main.rs +++ b/openssl-sys/build/main.rs @@ -79,6 +79,9 @@ fn main() { let target = env::var("TARGET").unwrap(); let (lib_dirs, include_dir) = find_openssl(&target); + if let Some(printable_include) = include_dir.to_str() { + println!("cargo:rerun-if-changed={}", printable_include); + } if !lib_dirs.iter().all(|p| Path::new(p).exists()) { panic!("OpenSSL library directory does not exist: {:?}", lib_dirs);