Skip to content

Commit

Permalink
build: ensure we build secp first
Browse files Browse the repository at this point in the history
maybe this is the issue

Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Nov 28, 2024
1 parent 8d96dbd commit c30d845
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,20 @@ fn main() {
build.flag("-O1");
}

build.compile("libnostrdb.a");
// Print out the path to the compiled library
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
println!("cargo:rustc-link-search=native={}", out_path.display());

secp256k1_build();

build.compile("libnostrdb.a");
println!("cargo:rustc-link-lib=static=nostrdb");

// Re-run the build script if any of the C files or headers change
for file in &["nostrdb/src/nostrdb.c", "nostrdb/src/nostrdb.h"] {
println!("cargo:rerun-if-changed={}", file);
}

// Print out the path to the compiled library
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
println!("cargo:rustc-link-search=native={}", out_path.display());
println!("cargo:rustc-link-lib=static=nostrdb");

// Link Security framework on macOS
if cfg!(target_os = "macos") {
println!("cargo:rustc-link-lib=framework=Security");
Expand Down

0 comments on commit c30d845

Please sign in to comment.