How can I use qmake to copy files recursively -


in source tree have bunch of resources, want copy them make install defined target path. since resource tree has many, many subdirectories, want qmake find files recursively.

i tried:

   resources.path = /target/path    resources.files += `find /path/to/resources`    installs += resources 

and:

    resources.path = /target/path     resources.files += /path/to/resources/*     resources.files += /path/to/resources/*/*     resources.files += /path/to/resources/*/*/*     resources.files += /path/to/resources/*/*/*/*     installs += resources 

both don't have result hoping for.

i have done this:

res.path = $$out_pwd/targetfolder res.files = sourcefolder  installs += res 

this copy "wherever qmake script is"/sourcefolder buildfolder/"same sub folder on build dir"/targetfolder

so have targetfolder/sourcefolder/"all other subfolders , files..."

example:

#(my .pro file's dir) $$pwd = /mysources/ #(my build dir)       $$out_pwd = /project_build/   extras.path = $$out_pwd extras.files += extras src.path = $$out_pwd src.files += src  installs += extras src 

would copy /mysources/extras /project_build/extras , /mysources/src /project_build/src


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -