[Moved] qmake - copy files from DESTDIR
I've searched how to copy any file from one dir to another. It can be done via QMAKE_POST_LINK or target.path... well, I am not conviced about correctness of these solutions.
QML wizard in Qt Creator uses this:
folder_01.source = qml/app
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
But I am equally unsure about correctness.
I saw sometihing like:
@QMAKE_POST_LINK = quote(cmd copy /y File.exe ../dir/)@
But it wrote: wrong command (or sth similar).
Do you want to copy data from or to your DESTDIR? The topic states from, which looks a bit weird at first sight.
Well I've got this situation:
I've got this structure:
all/ # Where the whole application (EXEs/DLLs) would be stored
Apps/ # Where would be stored EXEs
Libs/ # Where would be stored DLLs
Now, all files are generated correctly, but from their locations I need copying that DLLs/EXEs to directory "all"...but how? I've used (DLL)DESTDIR...
Pretty strange setup, then. Why not set DESTDIR for all those libs and apps to copy into "all" right away, without going into "Libs" and "Apps" first? Or just setup linking for apps so that they do find the libs located in "Libs"?
Anyway, I'm not an expert on QMake, and it's being said it does not very good for large, complicated projects. Maybe create your own shell script that would handle this copying for you? This way you can be sure it will work as you wish, and in a "correct" manner.
Well I've simplified it...Now it works (not as I planned, but better than nothing)...