【发布时间】:2020-02-28 03:12:31
【问题描述】:
我正在尝试在 Windows 上的 cmake 项目中使用 tesseract。我安装了 tesseract 5.0 和 tesseract 4.0。他们都没有 cmake 文件夹所以行
find_package(Tesseract REQUIRED)
生产
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.
但是,在 tesseract 5.0 的安装文件夹中,有 libtesseract-5.dll 和许多其他文件夹。我可以在我的 cmake 项目中链接它们吗?如果是这样,怎么做?为什么安装文件夹中没有包含文件?我应该如何在我的项目中包含 .h 文件?
【问题讨论】:
-
你是如何安装 tesseract 的?
-
"它们都没有 cmake 文件夹"...这很奇怪。 GitHub repo 显示应该有一个
cmake文件夹。你是如何安装 tesseract 的? -
我猜这个问题只是之前one被问到是同一作者的延续。我想知道这两个问题是否实际上是关于同一个问题。
-
@user898678 我通过这里安装:github.com/UB-Mannheim/tesseract/wikicmake 不附带的版本 5.0.0 以及通过这里tesseract-ocr.github.io/tessdoc/… 在“使用 UB Mannheim 的 MinGW-w64 制作的 Windows 安装程序”中cmake也不自带
-
@squareskittles repo里面有个cmake文件夹,不过我觉得是用cmake编译项目的,不是放到安装文件夹里面的文件夹
标签: windows dll cmake shared-libraries tesseract