ccouzens / tesseract-sys

Rust FFI bindings to tesseract
MIT License
26 stars 18 forks source link

Add support for manually compiled windows env vars #11

Closed nico-abram closed 2 years ago

nico-abram commented 2 years ago

Hi, this PR should add support for manually setting env vars to point to a manually compiled tesseract on windows (Similar to what the opencv crate allows).

In case my usecase is relevant, I'm trying to compile on windows with the msvc toolchain using cross language LTO. To do so, I need to use clang instead of msvc's cl.exe (Since the LTO uses LLVM bitcode and MSVC does not know how to generate that, only clang does), and I'm specifically using clang-cl.exe . VCPKG does not support a clang-cl triplet, not even in it's community triplets. I tried using this custom triplet someone uploaded on github but have not gotten it to work so far.

I'm opening an equivalent PR on leptonica-sys https://github.com/ccouzens/leptonica-sys/pull/11

ccouzens commented 2 years ago

Thank you. Merged and released as tesseract-sys 0.5.10