"qmake not found!" -- Qt-4.3.4 is installed, so what must I set to point cmake to it?
Greetings all. A complete newbie here (i.e. as of Saturday), but I'm loving it so far.
I was told that starting with Slackware was the way to go, as it would force me to do the work necessary to understand linux -- and boy were they ever right! I think I'm [just] starting to get the hang of things now, but I've run into a bit of a problem and apparently google is not my friend. I've installed Qt-4.3.4, but cmake isn't being pointed to the correct directory. I tried running Quote:
Quote:
Quote:
Any suggestions? |
The problem is that both Qt 3 and 4 qmake executables have the same name; luckily, the solution is simple. You don't have to mess with QTDIR with Qt 4.x: you just need to create a symlink qmake-qt4 to your Qt 4's qmake binary - CMake's Qt 4 module is looking for executable named qmake-qt4 first, and then to one named qmake. Once Qt 4's qmake found by CMake, it will do the rest.
You may wish also to try installing Qt 4 through corresponding SlackBuild script (tried to put a link here - alas, seems like I'm not allowed as this is my first post, but you should be able to find it easily yourself). HTH. |
I generally install qt4 to /opt/qt4 ... there are lots of packages out there that do this afaik, although I compiled it from src.
|
what are you trying to install ?
|
Quote:
/usr/share/apps/kdevappwizard/imports/qt4qmake but I'm not sure what to do next. Should the symlink go to that location, or to my Qt4 install directory's "qmake" executable? And where should the symlink start from? Is the location specified within cmake's module? I'd hate to have to re-install Qt 4 (I already had to, as I mistakenly installed the core instead of devel). But that's because it seems like taking the easy way out, rather than actually learning where my current problem lies and how to fix it directly. Quote:
Quote:
|
Thanks for the link, I just built it from source successfully by running:
Code:
cmake -DQT_QMAKE_EXECUTABLE=/usr/local/Trolltech/Qt-4.3.0/bin/qmake . Code:
cmake -DQT_QMAKE_EXECUTABLE=/usr/local/Trolltech/Qt-4.3.4/bin/qmake . |
Quote:
Now, is there a way I can set cmake to automatically load qmake from that directory? EDIT: Oh, and where did the "-DQT_QMAKE_EXECUTABLE=..." option come from? I don't remember seeing it in cmake's help file. |
Well, you can also do this in interactive mode running 'cmake -i .', it should list it near the end as an option.
|
Quote:
|
Create a symlink qmake-qt4 say in /usr/local/bin (or anywhere else in your $PATH):
ln -s /usr/local/Trolltech/Qt-4.3.0/bin/qmake /usr/local/bin/qmake-qt4 CMake will catch it automatically then. |
Perfect -- many thanks to all for the help!
|
All times are GMT -5. The time now is 03:01 PM. |