Copy files to Build directory



  • Hello,

    I created a project in Qt Creator (2.6.2) and wrote some source code (.h/.cpp). When I build/run the project, Creator creates new directories for Debug or Release builds.

    Please, I have three questions:

    • how to copy some files into the project directory? I can copy those files in OS as usual, but Creator wont show the files in "Active Project Pane". I know I can add a library to the project by right clicking on the .pro file but the files I want to add are not libraries... Also, I cannot put those files to .qrc as the files are not meant for Qt but for a library I'm also including.

    • If I somehow managed to copy some files to the project directory, how to make them to be automatically copied to those Debug or Release directories, next to the application executable?

    • I would like to organize those files by putting them into a directory. Is it possible to copy the whole directory or do I have to manually specify every file I want to copy over?

    If it makes my life easier I could upgrade to the newly released Qt Creator 2.7...

    Thanks in advance!


  • Moderators

    This is a problem of qmake, not Qt Creator. You could probably play around with DEPLOYMENT and QMAKE_POST_LINK variables, but there is no easy and straightforward way that I know about.



  • According to the docs, DEPLOYMENT is used in Windows CE only. But QMAKE_POST_LINK looks interesting, thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.