I already tried the pre-compiled Leptonica binary link but I read here that I have to build this from source only. So I tried building Leptonica from source.
I downloaded the source code of Leptonica from this [link].(https://github.com/tesseract-ocr/tesseract) Then I tried to build this code using CMake. To build I used CMake GUI. In source-code path I gave where CMakeLists.txt
is located and in cross compiling option I gave this scripts\buildsystems\vcpkg.cmake
from this link.
But I am getting this error
CMake Error at C:/vcpkg/scripts/buildsystems/vcpkg.cmake:247 (_find_package):
Could not find a package configuration file provided by "Leptonica" (requested version 1.74) with any of the following names:
LeptonicaConfig.cmake
leptonica-config.cmake
Add the installation prefix of "Leptonica" to CMAKE_PREFIX_PATH or set
"Leptonica_DIR" to a directory containing one of the above files.
If "Leptonica" provides a separate development package or SDK,
be sure it has been installed.
For this I build leptonica separately and generated this LeptonicaConfig.cmake
file as asked in this error. But now I have to change the CMakeLists.txt
and set Leptonica_DIR
to the directory where my this LeptonicaConfig.cmake
located. I don't know how to do this I tried adding this line in cmakelists file set(Leptonica_DIR="C:\Leptonica")
. But this doesn't work, may be this is wrong.
I am really stuck, I am using tesseract4.0
and Leptonica 17.6
and really new to this building process.