I am using Debian OS and I'm trying to point to cmake where is my Qt4.
I try to build qjson library and with its CMakeLists.txt: http://pastebin.com/fKNp0Qgy
I get:
Qt5 not found, searching for Qt4
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
CMake Error at /usr/share/cmake-2.8/Modules/FindQt4.cmake:1386 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
CMakeLists.txt:55 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
I'm not familiar with CMake and Qt config, but I'm curious what setting force CMake FIND_PACKAGE to look into '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake' for qmake. I have installed Qt 4.8.5 from source and I have Qt4 bin folder in completely different directory.
Simplest solution was add a link in the directory that the gem expected to find it. On Ubuntu 14.04 it qmake lives in /usr/bin. Simple solution.
1) Where is your qtchooser configuration file?
2) From the list of conf files, probably there is one call "default.conf" This one is a link to one of the others (4.conf or qt4.conf or 5.conf or qt5.conf). Choose the one that makes sense too you, and create a link to it.
Suppose your default file path is
/usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
Create backup:
Let's say you target is /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf
Then:
3) Is the path to your qmake right?
Check qmake location
Is the same one as indicated in your modified qtchooser/default.conf?
If the answer is YES, then you are done. If the anser is no, then you need to modify the file:
Create backup:
Edit file and change path to your qmake location
Now it should be done.