Am streda 08 Jún 2011 schrieb Enrico Forestieri: > On Wed, Jun 08, 2011 at 10:19:07PM +0200, Kornel wrote: > > Am streda 08 Jún 2011 schrieb Enrico Forestieri: > > > On Wed, Jun 08, 2011 at 08:24:37PM +0200, Vincent van Ravesteijn wrote: > > > > On 7-6-2011 15:24, Enrico Forestieri wrote: > > > > > On Tue, Jun 07, 2011 at 03:06:30PM +0200, Enrico Forestieri wrote: > > > > >> The only problem that I foresee is when one of the minor numbers > > > > >> in the Qt version is greater than 9. For example, it will fail > > > > >> for Qt 4.10.0 (in its present form), but it can be complicated > > > > >> a bit to also account for that. > > > > > > > > > > Like the attached, for example. > > > > > > > > Is this good enough to be committed ? > > > > > > I think so. > > > > I am not sure, how e.g. "4.10.11" should convert. > > > > 1.) As proposed by enrico: "0x040a0b" > > > > or > > > > 2.) As used in official cmake module "FindQt.cmake" as "0x041011" > > Doh! It seems Qt people have to change their macro in qglobal.h, then :) > > Excerpt from qglobal.h: > > /* > can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) > */ > #define QT_VERSION_CHECK(major, minor, patch) > ((major<<16)|(minor<<8)|(patch))
Ok then. I seem unable to construct a hexadecimal number representation in cmake. But in our case using the equivalent decimal should be ok. In my case (4.7.2) it evaluates e.g. -DQT_VERSION=263938 ... I will change it. Kornel
signature.asc
Description: This is a digitally signed message part.