Skip to content

Commit

Permalink
Add lib64 to the rustc-link-search path
Browse files Browse the repository at this point in the history
Additional context from #141 (comment)

I am actually not sure, but there was changed in cmake scripts in zlib-ng to 2.1. And the default cmake detection is a mess :D
So I think if we want to test it in CI, we have to also test against different distribution than Ubuntu or Debian.

From cmake source code:

```
 # Override this default 'lib' with 'lib64' iff:
 #  - we are on Linux system but NOT cross-compiling
 #  - we are NOT on debian
 #  - we are NOT building for conda
 #  - we are on a 64 bits system
```

Co-Authored-By: Jakub Onderka <ahoj@jakubonderka.cz>
  • Loading branch information
Byron and JakubOnderka committed Jul 25, 2023
2 parents 4457ab3 + f8be294 commit c15ad61
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build_zng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ pub fn build_zlib_ng(target: &str, compat: bool) {

let includedir = install_dir.join("include");
let libdir = install_dir.join("lib");
let libdir64 = install_dir.join("lib64");
println!(
"cargo:rustc-link-search=native={}",
libdir.to_str().unwrap()
);
println!(
"cargo:rustc-link-search=native={}",
libdir64.to_str().unwrap()
);
let mut debug_suffix = "";
let libname = if target.contains("windows") && target.contains("msvc") {
if env::var("OPT_LEVEL").unwrap() == "0" {
Expand Down

0 comments on commit c15ad61

Please sign in to comment.