PDA

View Full Version : QMake incorrectly parses TEMPLATE parameter at the command line



Paladin12
3rd July 2008, 15:30
Hi,

I'm trying to build a widget library. If I type:



>> qmake -project "TEMPLATE = lib" MyProject.pro .


The result is:



TEMPLATE = lib
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .

# Input
HEADERS += MyProjectImpl.h
FORMS += MyProject.ui
SOURCES += MyProjectImpl.cpp


As you can see there are two 'TEMPLATE' entries when there should only be one and this breaks my build. The 'TEMPLATE = app' line should be absent.

Is this a bug or am I using the command line incorrectly?

[Windows XP SP2, Qt4.4]

jacek
3rd July 2008, 22:29
You can change the template by passing -t option.

Paladin12
7th July 2008, 08:44
Perfect.


qmake -project -t "lib" MyProject.pro .

works.

Glad I put this in the newbie 'section'! Thanks.