cmake not working, could not exec qmake

For newer versions of Ubuntu, if you have only installed version 5 of the Qt Framework, you may get this error. If you want to use Qt version 5 by default, then you should run the following command to fix the error:

sudo apt install qt5-default

You need the qt dependences:

sudo apt-get install qt4-qmake libqt4-dev


Does the trick:

sudo apt-get install qt4-qmake

You do not need to install half a gigabyte of qt sdk!


I read on another post that the problem has something to do with CMake not being able to find Qt4 qmake.

However in my case, it was simply a matter of not having qt4-qmake. This solved it (but weighs a heavy 440MB):

sudo apt-get install qt-sdk

Tags:

Cmake

Qmake