Skip to content

Commit

Permalink
Match up to cmake changes
Browse files Browse the repository at this point in the history
  • Loading branch information
emlowe committed Oct 30, 2024
1 parent 006325f commit 2702002
Showing 1 changed file with 9 additions and 25 deletions.
34 changes: 9 additions & 25 deletions rust_bindings/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,16 @@ fn main() {

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

if cfg!(target_os = "windows") {
let build_type = if cfg!(debug_assertions) {
"Debug"
} else {
"Release"
};

println!(
"cargo:rustc-link-search=native={}",
dst.join("build")
.join("lib")
.join("static")
.join(build_type)
.to_str()
.unwrap()
);
println!(
"cargo:rustc-link-search=native={}",
dst.join("build")
.join("lib")
.join("static")
.to_str()
.unwrap()
);

if cfg!(target_os = "windows") {
println!("cargo:rustc-link-lib=static=mpir");
println!(
"cargo:rustc-link-search=native={}",
Expand All @@ -56,15 +49,6 @@ fn main() {
.unwrap()
);
} else {
println!(
"cargo:rustc-link-search=native={}",
dst.join("build")
.join("lib")
.join("static")
.to_str()
.unwrap()
);

println!("cargo:rustc-link-lib=gmp");
}

Expand Down

0 comments on commit 2702002

Please sign in to comment.