How to copy the compiled file to a specific directory
-
In Visual Studio, there is a pre and post compile command where I can run scripts (like a batch script) that might copy the compiled output from Visual Studio. In Qt Creator, there is the "Add Build Step" which seems like it is where I can put a command (like a copy command), but I'm clearly not getting it. It just errors out now when I compile with the copy command. I'm doing it wrong.
So the question is, how do I insert a copy command into the compile pipeline in Qt Creator?
-
Take a look at these StackOverflow questions and answers. It shows how to edit your .pro file to achieve a file copy after build:
http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output
In summary, you can use the INSTALLS variable of qmake:
http://stackoverflow.com/a/3991210/1583123
Or you can use QMAKE_COPY to copy files to the destination directory (or any arbitrary directory):