[Interest] distinguish nmake and sln generators in qmake script

Joerg Bornemann Joerg.Bornemann at qt.io
Thu Nov 7 10:58:24 CET 2019


On 11/2/19 9:51 AM, Vyacheslav Lanovets wrote:

> What is the best way to distinguish between Visual Studio Solution
> vcxproj generator (Src\qtbase\qmake\generators\win32\msvc_vcproj.cpp
> described in https://doc.qt.io/qt-5/qmake-platform-notes.html#creating-visual-studio-project-files)
> and Makefile nmake generator (qmake\generators\win32\msvc_nmake.cpp)
> inside pri/pro script?
> 
> I use this check
> contains(TEMPLATE, "^vc.+")
> 
> Am I right?

That will work fine. The usual pattern is
contains(TEMPLATE, vc.*)

In the contains function, the pattern is always wrapped in ^ and $.


BR,

Joerg


More information about the Interest mailing list