QtCreator / qmake additional goals not fulfilled

I have a Qdake subdirs project and in a top level .pro file, I specify an additional target as follows:

gruntbuild.target = gruntbuild gruntbuild.commands = grunt --gruntfile $$PWD/Gruntfile.js gui.depends = lib gruntbuild QMAKE_EXTRA_TARGETS += gruntbuild 

I see in the resulting Makefile that the gruntbuild target gruntbuild correctly added, however the all target does not reference it, so gruntbuild does not start when QtCreator is called by jom.exe .

Do I need to add an additional command to ensure the launch of the target?

+5
source share
1 answer

I think this is as simple as adding gui to QMAKE_EXTRA_TARGETS . In other words, use

 QMAKE_EXTRA_TARGETS += gui gruntbuild 

The reason is that you need to "export" the modified gui -target to the Makefile. This will add another dependency for the purpose, but it seems to be legal.

0
source

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


All Articles