In my Qt project I'm trying to copy libraries as part of the build process. The goal is to have a ready made distribution after the build with all necessary dynamic libraries.
This seems acheivable with the INSTALLS variable, but I find the documentation a bit thin: qmake Variable Reference: INSTALLS
In the example given:
target
already defined, or is defined by writing target.path =
?.path
and ...?Yeah, the docs have much to be desired here.
target
is already defined, but that is a special case. You can define your own additional deployment sets. Here is how we specify the image format plugins:
imageformats.path = /opt/some/path/bin/imageformats
imageformats.files += $$[QT_INSTALL_DATA]/plugins/imageformats/*.so
INSTALLS += imageformats
Here is the minimal documentation about the three commands: http://doc.qt.io/qt-4.8/qmake-environment-reference.html#installs
yourset.path = /path/in/which/to/install/files
yourset.files = /files/to/install
yourset.extra = custom commands to run, eg. `touch somefile.txt`
INSTALLS += yourset