tesseract编译问题:未设置leptonica_OUTPUT_NAME [英] tesseract compile issue: leptonica_OUTPUT_NAME is not set
问题描述
我正在尝试编译Tesseract开源OCR引擎( https:// github的源代码。 com / tesseract-ocr / tesseract )。
I am trying to compile the source code of Tesseract Open Source OCR Engine (https://github.com/tesseract-ocr/tesseract).
但是在运行cmake时,总是会出现以下错误:
But when running cmake, I always get the following error:
CMake错误:此项目中使用了以下变量,但是
设置为NOTFOUND。请设置它们或确保它们已设置
并在CMake文件中正确测试:leptonica_OUTPUT_NAME
由目标 libtesseract链接到目录/ home / test / github / tesseract
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: leptonica_OUTPUT_NAME linked by target "libtesseract" in directory /home/test/github/tesseract
我已经下载了leptonica的源代码( http://www.leptonica.com/download.html )并安装它。
I have already downloaded the source code of leptonica (http://www.leptonica.com/download.html) and installed it.
我想知道应将哪个值设置为leptonica_OUTPUT_NAME。
I am wondering which value should I set to leptonica_OUTPUT_NAME.
推荐答案
我遇到了同样的问题。似乎
I ran into the same problem. It seems that
find_package(PkgConfig REQUIRED)
pkg_check_modules(Leptonica REQUIRED lept>=${MINIMUM_LEPTONICA_VERSION})
在查找leptonica时遇到问题,而cmake的 find_package
正常工作:
in CMakeLists.txt
has problems finding leptonica whereas cmake's find_package
just works fine:
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.cppan)
# if (NOT Leptonica_DIR AND NOT MSVC)
# find_package(PkgConfig REQUIRED)
# pkg_check_modules(Leptonica REQUIRED lept>=${MINIMUM_LEPTONICA_VERSION})
# else()
find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED CONFIG)
# endif()
else()
出于完整性考虑(均从来源汇编):
For completeness (both compiled from sources):
- tesseract 4.00.00alpha
- leptonica-1.74.4
这篇关于tesseract编译问题:未设置leptonica_OUTPUT_NAME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!