From 4261b2a8b3338ba3297552fb8d77831feff90e47 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 10 Feb 2025 10:47:52 +0100 Subject: [PATCH] Fix unnecessary search path warning on macOS --- zng/cmake.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zng/cmake.rs b/zng/cmake.rs index 5d6b6eb8..614bf946 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" {