本文介绍了tesseract编译问题:未设置leptonica_OUTPUT_NAME的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译Tesseract开源OCR引擎()。

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:

我已经下载了leptonica的源代码()并安装它。

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 11:21