Openssl build fix (#1422)

* adding build.rs for libs
This commit is contained in:
James Hodgkinson 2023-03-05 17:25:38 +10:00 committed by GitHub
parent 0e57b6f914
commit a3016ea6ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

13
libs/crypto/build.rs Normal file
View file

@ -0,0 +1,13 @@
// include!("src/lib/audit_loglevel.rs");
use std::env;
fn main() {
if let Ok(v) = env::var("DEP_OPENSSL_VERSION_NUMBER") {
let version = u64::from_str_radix(&v, 16).unwrap();
if version >= 0x3000_0000 {
println!("cargo:rustc-cfg=openssl3");
}
}
}

View file

@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
[target.'cfg(target_family = "windows")'.dependencies]
whoami.workspace = true
whoami = {workspace = true}
[target.'cfg(not(target_family = "windows"))'.dependencies]
users.workspace = true
users = {workspace = true}