CMake: glib frontend won't build as a static library
Submitted by Phillip Berndt
Assigned to poppler-bugs
Link to original bug (#103765)
Description
When compiling with -DBUILD_SHARED_LIBS=OFF the glib backend will still build as a shared library. This is because
add_library(poppler-glib SHARED ${poppler_glib_SRCS} ${poppler_glib_generated_SRCS})
is hardcoded and there is no corresponding line defining an associated static library.
Adding a second, STATIC library and associated install() directive manually gives me a working static version of the glib interface. Removing SHARED doesn't suffice as dependencies aren't resolved correctly by parts of the CMakeLists that depend on the library.
(Other interfaces might be affected as well, I haven't checked.)