QMAKE_EXTRA_TARGETS not geting executed
-
I am trying to use QMAKE_EXTRA_TARGETS - The following project file seems not to work. Not sure what I am doing wrong
TEMPLATE = subdirs SUBDIRS += mytarget.commands = echo \" ********************** Hello World\" mytarget.depends = QMAKE_EXTRA_TARGETS += mytarget
Same for this one:
TEMPLATE = subdirs SUBDIRS += mytarget.commands = echo test > test.txt mytarget.depends = QMAKE_EXTRA_TARGETS += mytarget
-
Mhmm... seems to be a Qt bug - see https://bugreports.qt.io/browse/QTBUG-63151
Does anyone see any kind of workaround to archive this functionnality?
-
Mhmm... seems to be a Qt bug - see https://bugreports.qt.io/browse/QTBUG-63151
Does anyone see any kind of workaround to archive this functionnality?
Hi @Lolo67,
QTBUG-63151 seems to be in combination with Visual Studio - do you use Visual Studio?
I'd rather say your problem is that you try to use these commands in a
TEMPLATE = subdirs
project file. These files only take subdir projects, the build definitions are in these subdir .pro files.If you want the same extra targets in all pro files, you can move them into a
.pri
file.