Skip to content

Commit 7735b49

Browse files
committed
Change c++ link flags
1 parent a58b6d7 commit 7735b49

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

mupdf-sys/build.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ fn run() -> Result<()> {
6262
println!("cargo:rerun-if-changed=wrapper.h");
6363
println!("cargo:rerun-if-changed=wrapper.c");
6464

65-
#[cfg(feature = "tesseract")]
66-
println!("cargo:rustc-flags=-l dylib=c++");
67-
6865
Build::new(&target).run(&target, build_dir)?;
6966
build_wrapper(&target).map_err(|e| format!("Unable to compile mupdf wrapper:\n {e}"))?;
7067

mupdf-sys/make.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@ impl Make {
242242
})?;
243243
}
244244

245+
#[cfg(feature = "tesseract")]
246+
if target.os == "macos" {
247+
println!("cargo:rustc-link-lib=c++");
248+
} else {
249+
println!("cargo:rustc-link-lib=stdc++");
250+
}
251+
245252
println!("cargo:rustc-link-search=native={build_dir}");
246253
println!("cargo:rustc-link-lib=static=mupdf");
247254
println!("cargo:rustc-link-lib=static=mupdf-third");

0 commit comments

Comments
 (0)