I posted this to the CMake mailing list, but haven't had a satisfactory answer.

I'm using Linux Mint 4.0 and have just downloaded and compiled the latest version of Qt (4.3.3). I installed it sandboxed (/usr/local/Trolltech etc), as I already have the Ubuntu version of Qt 4 installed in /usr/lib for building Debian packages of QTM.

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?