c++ - Qmake copy multiple files while building -
i have list of files in qmake project. , want them copied in build directory @ build time.
my qmake file below
other_files += \ input1 \ input2 \ input3 \
i'm using linux. i've read few stack overflow questions , googled problem cannot find exact solution.
can done using for()
loop. may need adjust build_dir
variable. "other" files takes current directory.
other_files += \ input1 \ input2 \ input3 \ build_dir = build for(file, other_files) { eval($${file}.depends = $$file) eval($${file}.target = $$build_dir/$$file) eval($${file}.commands = cp $$file $$build_dir/) qmake_extra_targets += $${file} pre_targetdeps += $$build_dir/$$file }
Comments
Post a Comment