[CMake] FindQt4 stubbornly finding Qt3

Alexander Neundorf a.neundorf-work at gmx.net
Tue May 19 16:07:17 EDT 2009


On Tuesday 19 May 2009, Zach Laine wrote:
> On Tue, May 19, 2009 at 9:11 AM, Andreas Pakulat <apaku at gmx.de> wrote:
> > Thats what Clinton did, so how about trying exactly what he wrote?
>
> Ok, removing the two message() lines (which is exactly what Clinton
> wrote) produces:
>
> -- Found Qt-Version 4.3.5
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /ldisk/localstorage/proj/cmake/qt_test
>
> I don't see how that helps, since I can't tell what library and
> include paths are being detected.
>
> > In particular you could try without the QT_USE_FILE and see wether the
> > variables are different then.
>
> Ok, this:
>
> find_package(Qt4)
>
> message(${QT_LIBRARY_DIR}) # prints "/usr/lib"
> message(${QT_INCLUDE_DIR}) # prints "/usr/lib/qt3/include"
>
> produces this output:
>
> -- Found Qt-Version 4.3.5
> /usr/lib
> /usr/lib/qt3/include
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /ldisk/localstorage/proj/cmake/qt_test

Just to check for the simple things: you do this with a clean build tree, i.e. 
there is no already existing CMakeCache.txt in the directory, which already 
has QT_INCLUDE_DIR set to /usr/lib/qt3/include ?
This would keep cmake from searching again.

Alex


More information about the CMake mailing list