Hello again,
I messed up thing some more: I made the plug-in loading lazy, i.e. we
only try to load a plug-in when the corresponding format is used. And
I added build-time options to make the plug-ins static. (One option
for each plug-in, e.g. for the Arch Linux package I choose to make PDF
static and PS not.)
Of course, this further complicates the matter of determining the
actual "TARGET" variable in Makefile from qmake's "TARGET", e.g.
"libqpdfview_pdf.so" or "libqpdfview_pdf.a" for "qpdfview_pdf"...
Does anyone have an idea which qmake guru one could ask about this?
(The point is that I do not really want to write a OS switch statement
somewhere concatenating $QMAKE_PREFIX_SHLIB and things like that...)
Best regards, Adam.
Am 10.01.2013 20:42, schrieb Adam Reichold:
Hello again,
Ok, so I switched the whole thing to a plug-in based architecture
and changed the build system accordingly. Since this is the first
time I used Qt's plug-in system, comments and remarks are very much
appreciated.
For now, I chose to make plug-in loading explicit, i.e. the
program will only load the plug-ins it expects since build time and
fail if they are not present. (We probably want to relax this to
failing only if none are present.)
One thing I still have not figured out yet, is an automated way
for qmake to tell me what the plug-in files will actually be named
depending on the platform for which the program is built. (I.e.
TARGET=qpdfview-pdf and TEMPLATE=lib will yield libqpdfview-pdf.so
on Linux.) Currently, I explicitly set this (PDF_PLUGIN_NAME) in
the project include qpdfview.pri. Any hints/proposal are welcome.
Best regards, Adam.