Ubuntu – Ubuntu 14.04 Qt5 development libraries

14.04cmakeqt5

I want to build applications requiring Qt5 via CMake.

Which libraries do I have to install to achieve that?

What I have tried so far is searching for anything containing qt 5 core and dev, but have turned up empty:

apt-cache search qt | grep dev | grep core

only returns

libtulip-dev - Tulip graph library - core development files

The only thing seeming half-way to fit is "libqt5core5a", but installing that doesn't provide any development libraries…

Do I need any additional repositories? The ones from Kubuntu maybe?

Searching the web didn't yet give me any proper answers too (probably not the right keywords, I know, but :o). I e.g. found this question: What package do I need to build a Qt 5 & CMake application?, but there is no qtcore5-dev package in trusty repositories it seems…

Edit: Upon further experimenting, I did have qmake installed, but the 4.8.6 version (qt4-qmake). Trying to install the 5.x version brought no joy, though – (sudo apt-get purge qt4-qmake && sudo apt-get install qt5-qmake) – qmake now reports:

qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory

Is there something broken in the repositories here?

Best Answer

Seems

> apt-file search Qt5CoreConfig.cmake

was what I was missing. This got me

qtbase5-dev: /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreConfig.cmake

Installing that seems to lead to CMake finding Qt5. qmake still reports the same problem when directly called though...some remnant from qt4 still installed it seems...

Edit: As for the qmake problem, this is fixed by

sudo apt-get install qt5-default