问题
I installed, in Windows, Tesseract, using "Windows Installer made with MinGW-w64 from UB Mannheim" from here, and added to my CMakeLists.txt:
find_package(Tesseract REQUIRED)
but I get
CMake Error at CMakeLists.txt:14 (find_package):
By not providing "FindTesseract.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Tesseract", but CMake did not find one.
Could not find a package configuration file provided by "Tesseract"
(requested version 4.0) with any of the following names:
TesseractConfig.cmake
tesseract-config.cmake
Add the installation prefix of "Tesseract" to CMAKE_PREFIX_PATH or set
"Tesseract_DIR" to a directory containing one of the above files. If
"Tesseract" provides a separate development package or SDK, be sure it has
been installed.
I tried adding
set (CMAKE_PREFIX_PATH "C:\\Users\\LZ\\Downloads\\tesseract-4.0.0-alpha")
but it doesn't help. And also in this installation folder there are no TesseractConfig.cmake
or tesseract-config.cmake
来源:https://stackoverflow.com/questions/60426500/how-to-make-cmake-find-tesseract-library-in-windows-findtesseract-cmake