Skip to content

Commit 1f13404

Browse files
committed
CI fix
1 parent 680ae4b commit 1f13404

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

qpdf-sys/build.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ fn is_msvc() -> bool {
187187
env::var("TARGET").unwrap().ends_with("-msvc")
188188
}
189189

190+
#[cfg(feature = "vendored")]
191+
fn is_windows() -> bool {
192+
env::var("TARGET").unwrap().contains("-pc-windows-")
193+
}
194+
190195
#[cfg(feature = "vendored")]
191196
fn build_cc(name: &str, dir: &str, files: &[&str]) {
192197
let root = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
@@ -265,6 +270,10 @@ fn main() {
265270
build_cc("zlib", "zlib", ZLIB_SRC);
266271
build_cc("jpeg", "jpeg", JPEG_SRC);
267272
build_qpdf();
273+
274+
if is_windows() {
275+
println!("cargo:rustc-link-lib=advapi32");
276+
}
268277
}
269278

270279
#[cfg(not(feature = "vendored"))]

0 commit comments

Comments
 (0)