QMAKE_POST_LINK in the subdirs template project. Or how can I run any commands after build of the ALL projects?
-
Could you please advise why QMAKE_POST_LINK doesn't work in the subdirs project?
There is following subdirs project:
@
TEMPLATE = subdirs
CONFIG += orderedSUBDIRS += project1
SUBDIRS += project2#copy Qt dll's to the deploy directory
QT_DLLS +=
$$(Qt5_DIR)/bin/Qt5Core.dll
$$(Qt5_DIR)/bin/Qt5Gui.dllDEPLOY_DIR = $$PWD/deploy
win32:QT_DLLS ~= s,/,\,g
win32:DEPLOY_DIR ~= s,/,\,gfor(FILE,QT_DLLS){
QMAKE_POST_LINK += $${QMAKE_COPY} $${FILE} $${DEPLOY_DIR}$$escape_expand(\n\t)
}
@This QMAKE_POST_LINK command works correct in the project1 or project2.
And is there any way to run any command after build of the all projects in the subdirs project?
I need also to run batch and bash files after all project's build. -
You can add a custom build step after the 'make' step in order to run batch or bash script files.
However, to I also am in need of using something like QMAKE_POST_LINK in a subdirs project and would love to see an answer to your post.
-
... because there is no "link" step in a subdirs template project. If you were building an "app" project, then you could use the QMAKE_POST_LINK, but in a subdirs project, it is ignored.