I have seen several suggestions, but nothing really worked for me as I want. I just need to copy a file to the desired destination directory.
Say, for example from t
The selected answer is correct but it requires to call make install, which in my opinion is annoying or error prone. Instead, to copy files to the build directory use:
copydata.commands = $(COPY_DIR) $$PWD/required_files $$OUT_PWD
first.depends = $(first) copydata
export(first.depends)
export(copydata.commands)
QMAKE_EXTRA_TARGETS += first copydata
Where required_files must be replaced with your correct path. $$PWD is the path of current .pro file, you might not require this.
Note: I found this solution here. I recommend to read the whole article as it explains how it works.