[Qt-interest] just copy file to the target dir
Lars Amsel
lars.amsel at signalion.com
Sat Oct 10 13:52:55 CEST 2009
Hi,
Alexander Shabanov wrote:
> Could you please clarify how to specify rule in the *.pro file that
> copies one file to the target dir (a.k.a. DESTDIR)? Is it possible at
> all? Target OS is windows.
> I know how to achieve this in the standard makefiles, but I've no idea
> how to do the same in the Qt build system's script.
> The simpler solution is the better.
I do this via INSTALLS and POST_TARGETDEPS.
This is the relevant part of the .pri file:
debug {
win32:config_files.path=$$WORKSPACE/debug_win32
unix:config_files.path=$$WORKSPACE/debug_unix
}
release {
win32:config_files.path=$$WORKSPACE/release_win32
unix:config_files.path=$$WORKSPACE/release_unix
}
!isEmpty(config_files.files) {
INSTALLS+=config_files
POST_TARGETDEPS+=install_config_files
}
So files are always copied to the release/debug folder on the respective build env.
In the .pro file I have to add the files that should be copied before including
the .pri.
#works for single files
config_files.files += app.ini
#as well as for directories
config_files.files += configDir
I hope you can adept this for your needs.
regards
Lars
More information about the Qt-interest-old
mailing list