Skip to content

Commit

Permalink
Reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Sep 18, 2024
1 parent 8a0e464 commit eef4055
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions rust_bindings/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::env;
use std::path::PathBuf;
use std::str::FromStr;

use cmake::Config;

Expand All @@ -27,6 +26,8 @@ fn main() {
.define("BUILD_PYTHON", "OFF")
.build();

println!("cargo:rustc-link-lib=static=chiavdfc");

if cfg!(target_os = "windows") {
let build_type = if cfg!(debug_assertions) {
"Debug"
Expand All @@ -36,9 +37,7 @@ fn main() {

println!(
"cargo:rustc-link-search=native={}",
PathBuf::from_str(dst.display().to_string().as_str())
.unwrap()
.join("build")
dst.join("build")
.join("lib")
.join("static")
.join(build_type)
Expand All @@ -60,9 +59,7 @@ fn main() {
} else {
println!(
"cargo:rustc-link-search=native={}",
PathBuf::from_str(dst.display().to_string().as_str())
.unwrap()
.join("build")
dst.join("build")
.join("lib")
.join("static")
.to_str()
Expand All @@ -72,8 +69,6 @@ fn main() {
println!("cargo:rustc-link-lib=gmp");
}

println!("cargo:rustc-link-lib=static=chiavdfc");

let bindings = bindgen::Builder::default()
.header(manifest_dir.join("wrapper.h").to_str().unwrap())
.clang_arg("-x")
Expand Down

0 comments on commit eef4055

Please sign in to comment.