File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -62,9 +62,6 @@ fn run() -> Result<()> {
62
62
println ! ( "cargo:rerun-if-changed=wrapper.h" ) ;
63
63
println ! ( "cargo:rerun-if-changed=wrapper.c" ) ;
64
64
65
- #[ cfg( feature = "tesseract" ) ]
66
- println ! ( "cargo:rustc-flags=-l dylib=c++" ) ;
67
-
68
65
Build :: new ( & target) . run ( & target, build_dir) ?;
69
66
build_wrapper ( & target) . map_err ( |e| format ! ( "Unable to compile mupdf wrapper:\n {e}" ) ) ?;
70
67
Original file line number Diff line number Diff line change @@ -242,6 +242,13 @@ impl Make {
242
242
} ) ?;
243
243
}
244
244
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
+
245
252
println ! ( "cargo:rustc-link-search=native={build_dir}" ) ;
246
253
println ! ( "cargo:rustc-link-lib=static=mupdf" ) ;
247
254
println ! ( "cargo:rustc-link-lib=static=mupdf-third" ) ;
You can’t perform that action at this time.
0 commit comments