[Interest] Does qmake support installing Qt5 libraries with INSTALLS?

Roland Winklmeier roland.m.winklmeier at gmail.com
Thu Jan 12 18:48:09 CET 2017


Dear List,

I'm contributing to a project which contains several libraries and
applications. It is built using Qt5 and running on all major platforms.

First of all, I'm aware of the deployment applications like windeployqt
etc. However, no such application exists for Linux. Therefore I added
packaging mechanism into the qmake build system also for Windows and Mac OS
to be consistent.
I did this by adding install targets which do not only install the built
project binaries, but also the 3rdparty dependencies. I've used this
mechanism to also copy the Qt binaries into the final folder structure.

As an example:
win32: qt5_imageformats_plugins_target.files *=
$$[QT_INSTALL_PLUGINS]/imageformats/*$${DLL_DEBUG_SUFFIX}.dll
else:macx: [...]
else:unix: [...]
qt5_imageformats_plugins_target.path = $${PREFIX}/bin/imageformats

INSTALLS += qt5_imageformats_plugins_target


Knowing that, INSTALLS is a special command, which does not only copy, but
alot more including stripping, is there any side effect, I might have
missed? I could add a copy function, but INSTALLS seemed to solve the
problem nicely.

I'm asking since the upgrade to 5.6.2 (previously 5.6.0) I get the
following warnings:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/
bin/strip: symbols referenced by indirect symbol table entries that
can't be stripped in:
/Users/jenkins/build/dist/bin/imageformats/libqdds.dylib

This seem to be related to QTBUG-54212. Setting QMAKE_STRIPFLAGS_LIB
or QMAKE_STRIPFLAGS_APP does not help, since the INSTALLS command is
in a TEMPLATE = subdirs,
means none of those strip flags have an effect.

Therefore the question: Is this not supported what I'm doing or can I
workaround this somehow?
As a very dirty workaround, I removed 'QMAKE_STRIP = strip' from
mkspecs/common/mac.conf which restored the situation I had with 5.6.0, but
I'm not sure what the consequences are.

Thanks,
Roland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170112/dc790549/attachment.html>


More information about the Interest mailing list