CMake错误:CMAKE_MODULE_PATH不包含FindPoppler.cmake

时间:2018-06-23 08:55:33

标签: c++ linux cmake poppler

我的工作平台是Ubuntu 18.04 LTS。

我正在尝试从github安装QCViewer。从源代码安装QCViewer似乎需要很多软件包。因此,我遍历github存储库,在/usr处安装了所有构建依赖项,然后输入文件夹QCViewer/build/release并运行./build。直到cmake出现以下错误的软件包“ poppler”时,此方法才能正常工作:

root@ubuntu:/home/link/QCViewer-master/build/release# ./build

CMake Error at QCViewer/CMakeLists.txt:63 (FIND_PACKAGE):
  By not providing "FindPoppler.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Poppler", but
  CMake did not find one.

  Could not find a package configuration file provided by "Poppler" with any
  of the following names:

    PopplerConfig.cmake
    poppler-config.cmake

  Add the installation prefix of "Poppler" to CMAKE_PREFIX_PATH or set
  "Poppler_DIR" to a directory containing one of the above files.  If
  "Poppler" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
See also "/home/link/QCViewer-master/build/release/CMakeFiles/CMakeOutput.log".
make: *** No rule to make target 'install'.  Stop.

,还请注意:

link@ubuntu:~$ pkg-config --libs --cflags poppler -I/usr/include/poppler -lpoppler

同时,我发现该项目的CMakeLists.txt如下:

cmake_minimum_required (VERSION 2.6)
project(QCViewer)

find_package(PkgConfig)
pkg_check_modules(GTKMM gtkmm-2.4 freetype2 poppler-glib)


add_subdirectory(QCViewer)

那我该如何解决呢?

0 个答案:

没有答案