0

I am trying to build a project through a cmake generated make, where one necessary header file is /usr/local/include/poppler/poppler-config.h. However

export INCLUDE_PATH=/usr/local/include/poppler/

nor

export INCLUDE_PATH=/usr/local/include/ help, and I still get:

fatal error: poppler-config.h: No such file or directory.

What could I be missing?

I already have a pkg-config file for this dependency, which looks okay:

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: poppler
Description: PDF rendering library
Version: 0.33.0

Libs: -L${libdir} -lpoppler
Cflags: -I${includedir}/poppler

But adding it to a PKG_CONFIG_PATH environment variable doesn't help either.

Is there some cmake cache to reset for this? what should be an elegant solution?

matanster
  • 15,072
  • 19
  • 88
  • 167
  • 1
    why don't you use [`include_directories`](http://www.cmake.org/cmake/help/v3.0/command/include_directories.html) in CMake? – m.s. May 18 '15 at 13:00
  • I think I would rather solve this externally to the CMake definitions, leaving the CMake generic. But the CMake definition already has some `include_directories` in it. Might that be the problem? – matanster May 18 '15 at 13:05
  • You can use http://www.cmake.org/cmake/help/v3.0/module/FindPkgConfig.html to get the correct include dir from pgk-config and still keep your CMakeLists.txt generic – Finn May 18 '15 at 15:35
  • Yes @Finn that works. I wonder though if any environment variable can take care of it from outside the cmake definition. – matanster May 19 '15 at 11:27

0 Answers0