DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.76k stars 387 forks source link

Add vcpkg installation instructions #639

Closed FrankXie05 closed 2 years ago

FrankXie05 commented 2 years ago

leptonica is available as a port in vcpkg, a C++ library manager that simplifies installation for leptonica and other project dependencies. Documenting the install process here will help users get started by providing a single set of commands to build leptonica, ready to be included in their projects.

We also test whether our library ports build in various configurations (dynamic, static) on various platforms (OSX, Linux, Windows: x86, x64) to keep a wide coverage for users.

I'm a maintainer for vcpkg, and here is what the port script looks like. We try to keep the library maintained as close as possible to the original library. :)

DanBloomberg commented 2 years ago

Impressively succinct script! Did you find out why openjpeg (jp2k) failed to link in your build?

Thank you for the contribution!

Dan

FrankXie05 commented 2 years ago

@DanBloomberg Thank you very much for your quick response and acceptance. Regarding openjpeg, can you provide any issue or pr? I will do my best to solve it. :)

DanBloomberg commented 2 years ago

Both autoconf and cmake are able to link openjpeg to leptonica. I'd suggest you look at those scripts for guidance.

One irritating thing about openjpeg, which may be the source of your troubles, is that, unlike all the other I/O libraries, it puts the header files in a subdirectory specific for the release. This requires extra conditionals in the scripts.