[CMake] Maybe a bug in FindQt4.cmake

Jean-Paul Chaput Jean-Paul.Chaput at lip6.fr
Mon Sep 8 05:40:34 EDT 2008


Hello,


I may have found a problem in FindQt4.cmake. It may have been already
solved, in which case I apologize for generating noise on the list.
(but I've been able to find a fix with google...)

In attachement I joined a patch that fix the problem.

I use CMake 2.4.7 under Scientific Linux 5 (RHEL5 clone) and a Qt 4.3.2.
The problem shows when you uses a statically compiled Qt4.

To detect the Qt configuration file "qconfig.pri" the script runs the
command :
    qmake-qt4 -query QMAKE_MKSPECS
And assumes the result is a path. But, in fact it's a colon separated
list of pathes. When there is only one path, it works, but when more
than one path is present, it fails. The solution is to iterate over
the path list in the search of qconfig.pri (see attached patch).
On my system, the test also fails for dynamic linking, but the
linking process is less strict than for static and success thus
hiding the bug.

In addition I've added the test for detecting the libraries needed when
the "glib" feature is enabled : system libraries glib-2.0 & gthread.


In the hope to be useful.

-- 

      .-.           J e a n - P a u l   C h a p u t
      /v\     A d m i n i s t r a t e u r   S y s t e m e
    /(___)\                       |
     ^^ ^^                        |-- e-mail : Jean-Paul.Chaput at lip6.fr
                                  `-- Tel    : (33) 01.44.27.53.99 [prof.]
                                                    06.66.25.35.55 [port.]
                                                    01.47.46.01.31 [pers.]

    U P M C   Universite Pierre & Marie Curie
    L I P 6   Laboratoire d'Informatique de Paris VI
    A S I M   Architecture des Systemes Integres et Micro-electronique
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FindQt4-qconfig.patch
Type: text/x-patch
Size: 2047 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080908/484e7975/attachment.bin>


More information about the CMake mailing list