From 844839d9a54fc32874d31002a6f976b06e59049b Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Tue, 7 Jan 2020 23:48:19 -0800 Subject: [PATCH] Allow crates with a direct dep on libsqlite3-sys to know if `sqlcipher` has been enabled --- libsqlite3-sys/build.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libsqlite3-sys/build.rs b/libsqlite3-sys/build.rs index 3a98c5a..fcb27b8 100644 --- a/libsqlite3-sys/build.rs +++ b/libsqlite3-sys/build.rs @@ -206,6 +206,13 @@ mod build_linked { if cfg!(all(feature = "vcpkg", target_env = "msvc")) { println!("cargo:rerun-if-env-changed=VCPKGRS_DYNAMIC"); } + + // dependents can access `DEP_SQLITE3_LINK_TARGET` (`sqlite3` being the + // `links=` value in our Cargo.toml) to get this value. This might be + // useful if you need to ensure whatever crypto library sqlcipher relies + // on is available, for example. + println!("cargo:link-target={}", link_lib); + // Allow users to specify where to find SQLite. if let Ok(dir) = env::var(format!("{}_LIB_DIR", env_prefix())) { // Try to use pkg-config to determine link commands