QMake - how to add a step after assembly after EVERY assembly

Having a bit of trouble - I added the following lines for qmake to copy files to the application package on Mac.

mac {
    QMAKE_POST_LINK = $$PWD/package_mac.sh
}

The .sh file sometimes runs and seems to work (for now, it just runs touch geese, which creates a file with a name geesein the assembly directory (great!).

But it does not start every time I build, it seems, only when the files are changed. In fact, I want qmake to copy all my game resources to the right places on each platform (so create a folder on Windows, an application package on Mac, etc.) every time I build.

Any ideas?

+4
source share
1

POST_TARGETDEPS ( QMAKE_EXTRA_TARGETS)? , - ( , , .PHONY qmake), clean .

:

mac {
    package-script = $$PWD/package_mac.sh
}

package-target.target = $$PWD/package.tmp
package-target.depends = FORCE
package-target.commands = $$package-script

(. .)

0

Source: https://habr.com/ru/post/1523725/


All Articles