[CMake] FindQt4 stubbornly finding Qt3

Zach Laine whatwasthataddress at gmail.com
Mon May 18 21:25:35 EDT 2009


On Mon, May 18, 2009 at 4:57 PM, Clinton Stimpson <clinton at elemtech.com> wrote:
> # temp set of path to find desired Qt
> export PATH=/usr/local/Trolltech/Qt-4.3.5/bin:$PATH
> # create build dir
> mkdir build ; cd build
> # run cmake
> cmake ../
> # make
> make

As I originally said, I've already tried that:

>> I've renamed the qmake that comes installed on my system, and changed
>> PATH and QTDIR env variables in an effort to get CMake to find the
>> right version of Qt.  Any idea how I can fix my CMakeLists.txt and/or
>> system to fix this problem?

It seems to find Qt 4.3.5, but then the QT_INCLUDE_DIR variable is
still set to /usr/lib/qt3/include, and the make command line it
generates is of the form:

/usr/bin/c++   -g -I/usr/lib/qt3/include -I/usr/include/QtGui
-I/usr/include/QtCore   -DQT_SHARED -DQT_GUI_LIB -DQT_CORE_LIB -o
CMakeFiles/myexe.dir/window.o -c
/ldisk/localstorage/proj/cmake/qt_test/window.cpp

Zach Laine


More information about the CMake mailing list