[CMake] QT library succeeded

Matthew Smith indigojo at blogistan.co.uk
Sat Aug 17 11:27:58 EDT 2013


On 16/08/13 23:49, marco wrote:
> Hello,
> I'm having some touble wit Qt and and another library.
> I'm working on ubuntu 12.04 32 bit
> I have the Qt package from Trolltech in usr/local and unfortunately also
> a version in usr/local.
> Normally with other libs I don't have troubles in selecting the path and
> using the local version in QT.
> This time instead is happening something weird.
> I point the local QT directory, but when linking is messing up with the
> QT from the usr/local dir.
> Is there an easy way to exclude /usr/lib for that compilation, or
> selecting the library for linking that I want?
>

If it's the version in /usr/local you're having trouble with, you need 
to set the PATH environment variable to include the directory with qmake 
in it. For Qt 4 that's typically something like 
/usr/local/Trolltech/Qt-4.x.x/bin, so type this:

PATH=/usr/local/Trolltech/Qt-4.x.x/bin:$PATH
export PATH

Then run CMake and it will run qmake to determine which version you have 
while configuring.

Regards,

Matthew Smith




More information about the CMake mailing list