How to make Cmake find tesseract library in Windows (Findtesseract.cmake)?

微笑、不失礼 提交于 2021-02-11 14:31:22

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!