[CMake] A little patch for FindQt4.cmake

Clinton Stimpson clinton at elemtech.com
Tue Aug 8 14:00: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



More information about the CMake mailing list