Lines Matching +full:zlib +full:- +full:ng +full:-

12     println!("cargo:rerun-if-env-changed=LIBZ_SYS_STATIC");  in main()
13 println!("cargo:rerun-if-changed=build.rs"); in main()
19 let want_ng = cfg!(feature = "zlib-ng") && !cfg!(feature = "stock-zlib"); in main()
21 if want_ng && target != "wasm32-unknown-unknown" { in main()
25 // Don't run pkg-config if we're linking statically (we'll build below) and in main()
26 // also don't run pkg-config on macOS/FreeBSD/DragonFly. That'll end up printing in main()
27 // `-L /usr/lib` which wreaks havoc with linking to an OpenSSL in /usr/local/lib in main()
32 !target.contains("msvc") && // pkg-config just never works here in main()
38 // packages adding non-system search paths to link against libraries in main()
39 // that are also found in a system-wide lib dir. in main()
40 let zlib = pkg_config::Config::new() in main() localVariable
43 .probe("zlib"); in main()
44 if zlib.is_ok() { in main()
58 println!("cargo:rustc-link-lib=z"); in main()
70 || target.contains("pc-windows-gnu") in main()
80 // pkg-config files that we would find above. in main()
82 // In any case test if zlib is actually installed and if so we link to it, in main()
85 println!("cargo:rustc-link-lib=z"); in main()
96 cfg.warnings(false).out_dir(&build).include("src/zlib"); in build_zlib()
98 cfg.file("src/zlib/adler32.c") in build_zlib()
99 .file("src/zlib/compress.c") in build_zlib()
100 .file("src/zlib/crc32.c") in build_zlib()
101 .file("src/zlib/deflate.c") in build_zlib()
102 .file("src/zlib/infback.c") in build_zlib()
103 .file("src/zlib/inffast.c") in build_zlib()
104 .file("src/zlib/inflate.c") in build_zlib()
105 .file("src/zlib/inftrees.c") in build_zlib()
106 .file("src/zlib/trees.c") in build_zlib()
107 .file("src/zlib/uncompr.c") in build_zlib()
108 .file("src/zlib/zutil.c"); in build_zlib()
110 if !cfg!(feature = "libc") || target == "wasm32-unknown-unknown" { in build_zlib()
113 cfg.file("src/zlib/gzclose.c") in build_zlib()
114 .file("src/zlib/gzlib.c") in build_zlib()
115 .file("src/zlib/gzread.c") in build_zlib()
116 .file("src/zlib/gzwrite.c"); in build_zlib()
123 cfg.flag("-fvisibility=hidden"); in build_zlib()
136 fs::copy("src/zlib/zlib.h", dst.join("include/zlib.h")).unwrap(); in build_zlib()
137 fs::copy("src/zlib/zconf.h", dst.join("include/zconf.h")).unwrap(); in build_zlib()
140 dst.join("lib/pkgconfig/zlib.pc"), in build_zlib()
141 fs::read_to_string("src/zlib/zlib.pc.in") in build_zlib()
151 #[cfg(not(feature = "zlib-ng"))]
154 #[cfg(feature = "zlib-ng")]
156 let install_dir = cmake::Config::new("src/zlib-ng") in build_zlib_ng()
164 "cargo:rustc-link-search=native={}", in build_zlib_ng()
171 "zlib" in build_zlib_ng()
176 println!("cargo:rustc-link-lib=static={}", libname); in build_zlib_ng()
182 fn try_vcpkg() -> bool { in try_vcpkg()
187 fn try_vcpkg() -> bool { in try_vcpkg()
188 // see if there is a vcpkg tree with zlib installed in try_vcpkg()
191 .lib_names("zlib", "zlib1") in try_vcpkg()
192 .probe("zlib") in try_vcpkg()
196 println!("note, vcpkg did not find zlib: {}", e); in try_vcpkg()
202 fn zlib_installed(cfg: &mut cc::Build) -> bool { in zlib_installed()
205 cmd.arg("src/smoke.c").arg("-o").arg("/dev/null").arg("-lz"); in zlib_installed()