How to build poppler on Windows and include Poppler in Qt Creator?

120 views Asked by At

I am trying to use Poppler with Qt 5.6, using these steps:

  • I downloaded poppler-23.12.0.tar.xz and poppler-data-0.4.12.tar.gz on the website: https://poppler.freedesktop.org/

  • I unpacked them and added:

    set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};C:\\Users\\ntronghoa\\Music\\poppler-23.12.0\\poppler")
    set(Poppler_DIR "C:\\Users\\ntronghoa\\Music\\poppler\\poppler-23.11.0\\Library\\lib\\pkgconfig")
    
    find_package(Poppler REQUIRED) to CMakeList on Qt Creator
    

But I get this error:

C:\Users\ntronghoa\Documents\ERGFFF\CMakeLists.txt:14: error: 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.

How can I build Poppler, include, and use it with Qt in Qt Creator?

0

There are 0 answers