[poppler] cmake issues

Adrian Johnson ajohnson at redneon.com
Sat Sep 2 13:04:04 UTC 2017


As the autotools build will be dropped I've been gaining more experience
with the cmake build. I've found a few problems:

1) Is there any way to selectively disable the fontends? If I'm working
on core I like to minimize the rebuild times.

2) I usually install cairo git and poppler git to their own prefix for
testing. I compile popper with PKG_CONFIG_PATH set to this location so
it will link with cairo git. poppler-glib-demo is failing to link with
cairo. pdftocairo links fine. I noticed this because there is some new
API in cairo git and I have a poppler branch with support for this API.

The problem is the poppler-glib-demo link command lists "-lcairo" then
the libcairo.so. Manually running the link command without "-lcairo" (or
even just putting it after the libcairo.so) fixes the linking. The
pdftocairo link command does not have "-lcairo".

I don't know how to fix this in cmake. I assume it is the linking with
gtk3 that is adding the -lcairo. I tried adding ${CAIRO_LIBRARIES}
before ${GTK3_LIBRARIES} in glib/demo/CMakeLists.txt but it still fails
to link.

3) What is the preferred way to run cmake. In the top level dir? Or
create a build dir and run it in that? If I build in the top level dir,
git status shows a lot of build noise that has not been added to
.gitignore. I have to run git clean to clean it up. Whichever way is
best we should add the build output to .gitignore to hide it from git
status.


More information about the poppler mailing list