QMake subdir template retrieve all qt libs
Hi all !
I have a qmake which is building a template=SUBDIRS collection of subdirs. I package my application with Qt IFW. In order to deliver an executable to my end users, I copy the Qt libs from $$[QT_INSTALL_PREFIX]/bin/*.dll to $$PWD/packages/com.enterprise.appname/bin.
Currently, I'm copying all the libs, but I would like to solely copy the effective libraries needed by the projet. Is there any techniques to retrieve from the top project file all the libs needed by each of the subdir ?
Thank you a lot for your answers!
You can use Qt Deployment Tool: http://doc.qt.io/qt-5/windows-deployment.html
As told by the documentation, the command to use is :
windeployqt --qmldir <path-to-app-qml-files> <path-to-app-binary>
What if I don't have a single application binary, but a number not fixed ?
I really would like to find, if possible, a mean to access the dependencies of each of my subdir.
Thank you for your answers!
So you have more than one executable file?
Or one executable file and several libraries?
@jsulm I have more than one executable file and several libraries.
One thing that you could try is to add a custom target that will call windeployqt on your target. Something a bit like the
teststarget when using Qt's unit tests module.
Hope it helps