CMake doesn't know where is Qt4 qmake CMake doesn't know where is Qt4 qmake linux linux

CMake doesn't know where is Qt4 qmake


just try "sudo apt-get install qt-sdk" it works for me


I solved my problem.

Looking for QT_SELECT with grep command I found that QT_SELECT is related to /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf file. From the "default" file name I assumed that it is what is seen as QT_SELECT. Other configs presented with qtchooser -l are in /usr/share/qtchooser/ and /usr/lib/x86_64-linux-gnu/qtchooser directories.

Such a config file has two lines with paths. I just changed these lines, first pointing to my Qt bin directory and second pointing to my Qt lib directory. Then I could see that qtchooser -print-env shows QTTOOLDIR and QTLIBDIR to my Qt.

Then I could easily build qjson library with CMake, Qt4 was found correctly.


In my experience, this problem is most easily solved by putting the folder containing qmake in your PATH environment variable.