[Interest] Qmake one-line Qt version checking?

Rainer Wiesenfarth rainer_wiesenfarth at trimble.com
Thu Jan 5 17:43:17 CET 2017


2017-01-05 16:56 GMT+01:00 André Hartmann <andre.hartmann at iseg-hv.de>:

> lessThan(QT_MAJOR_VERSION, 5): message("This program requires Qt 5.8")
> else: lessThan(QT_MINOR_VERSION, 8): message("This program...")
>
> Is there a way to do a comparison here like in C++ in one line?
>

​With C++ >= 11, ...

static_assert(QT_VERSION >= 0x050800, "​This program requires Qt 5.8 or
higher");

​...should work​ (untested).

​Best regards
Rainer​


-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170105/b34cdf65/attachment.html>


More information about the Interest mailing list