Skip to content

Commit ab28f08

Browse files
committed
Add static feature to libcryptsetup
1 parent 982dded commit ab28f08

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ rand = "0.9.0"
4343

4444
[features]
4545
mutex = []
46+
static = ["libcryptsetup-rs-sys/static"]
4647

4748
[lints.rust]
4849
warnings = { level = "deny" }

libcryptsetup-rs-sys/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ nonstandard_style = { level = "deny", priority = 4 }
3333
all = { level = "deny" }
3434
cargo = { level = "deny", priority = 1 }
3535
multiple-crate-versions = { level = "allow", priority = 2 }
36+
37+
[features]
38+
static = []

libcryptsetup-rs-sys/build.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ use semver::Version;
66
use std::path::PathBuf;
77

88
fn probe() -> Library {
9-
match Config::new()
9+
let mut config = Config::new();
10+
#[cfg(feature = "static")]
11+
config.statik(true);
12+
match config
1013
.atleast_version("2.2.0")
1114
.cargo_metadata(false)
1215
.probe("libcryptsetup")

0 commit comments

Comments
 (0)