diff --git a/zng/cmake.rs b/zng/cmake.rs index 5d6b6eb..614bf94 100644 --- a/zng/cmake.rs +++ b/zng/cmake.rs @@ -39,19 +39,19 @@ pub fn build_zlib_ng(target: &str, compat: bool) { cmake.define("CMAKE_GENERATOR_PLATFORM", "Win32"); } + // libz-ng uses the GNUInstallDirs convention, so we can use the following + // to ensure libraries are placed in a consistent place in the + // installation dir. + cmake.define("CMAKE_INSTALL_LIBDIR", "lib"); + let install_dir = cmake.build(); 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" {