Currently pkg-config does not correctly list the dependency libs for
static linking when running with --static:
pkg-config --libs --static poppler-cpp
-lpoppler-cpp -lpoppler
The output of --static should also include the recursive dependencies
such as -lcairo -llcms2 -lopenjp2 -ltiff. For comparsion try
'pkg-config --libs libcurl' with and without --static'.
I think to resolve this, cmake should add a line like this to the
poppler.pc file:
Requires.private: cairo
Or alternatively hardcode dependency linker flags in Libs.private
field in poppler.pc:
Libs.private: -lcairo -lz -lgobject-2.0 -lffi -lglib-2.0 -lintl
-lpcre -lintl -liconv -lpcre -lpixman-1 -lfontconfig -lexpat
-lfreetype -lz -lbz2 -lpng16 -lz
And possibly other dependencies that poppler was configured with.
However I am not sure how to implement this but I think it should be
an option in cmake.
Thank you!
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler