[CMake] Linking to wrong version of Qt

Morten O. Hansen morten at wsgi.net
Sat Dec 8 12:04:39 EST 2007


> I've tried actually building with the new version, however, and the
> linker refuses to use it.  Even though the location of qmake is in the
> path and CMake detects version 4.3.3, it links to the Ubuntu version.
> This is a first-link issue, not the relink-on-install problem.  Does
> anyone know how to fix it?

I'm not sure if this is related. But I'm also using a local version, and had 
problems using it.

My problem was that I had not installed Qt, and ~/qt-copy/bin/qmake -v would 
give /usr/local/Trolltech/qt... and not ~/qt-copy where I actually had it 
compiled.

using -prefix=~/qt-copy with the configure command helped me atleast.

I guess since I actually dont have any files in /usr/local/Trolltech/.. 
FindQt4 just looks for another qmake. 

With regards,
Morten O. Hansen


More information about the CMake mailing list