[CMake] A little patch for FindQt4.cmake

Fu Limin limin.fu at ircc.it
Fri Aug 11 13:03:19 EDT 2006


>
>> From: Fu Limin <limin.fu at ircc.it>
>> Subject: [CMake] A little patch for FindQt4.cmake
>>
>> Hi,
>>
>> I have writen a little patch for FindQt4.cmake. The patch simply do one
>> thing, it read library linking flags from *.prl file under QTDIR/lib.
>> The reason that I create this patch is that, FindQt4 do not set all the
>> linking flags (e.g. -lXinerama etc.) required by qt application. I hope
>> this patch can be useful for somebody. The linking flags found in *.prl
>> files are stored in QT_LIBRARIES, maybe the script should be modified to
>> store them in separated variables, for example, flags from libQtCore.prl
>> should be stored in QT_QTCORE_LIBRARY etc.
>> cheers,
>>
>> Limin
>>
>
> Hi,  I was just about to do the same thing :)  However, yesterday, I
> came across some Qt documentation saying that the .prl files are of an
> internal format and Trolltech reserves the right to change the format
> whenever they want.
> So, instead, I was going to read the mkspecs/qconfig.pri file to get the
> Qt configuration options (x11sm, freetype, xrandr, xinerama, etc...).
> Based on that, do some FIND_LIBRARY calls using library paths specified
> by qmake.
>
> Does that sound like a better approach?
>
> Clint
>
>

Hi, sorry for the delay.

If qconfig.pri is more stable, it should be a good idea to use it instead
of *.prl. But in qconfig.pri there are mostly configuration parameters, so
you need a way to determine compiling options and linking libraries from
them, it seems not to be as straightforward as using *.prl, where the
linking flags are ready to use:). If you find a good way to use
qconfig.pri, please let me know:).

Limin



More information about the CMake mailing list