Reputation: 1706
We have some smaller libraries we use in our bigger project quite often.
Still we compile and run the unit tests of these smaller libraries as independent CI Jobs.
Most of these libs use QMake as buildtool, not using Qt in any way. And we started to move our CI-Jobs into docker containers. Now I realized that I always have to get qt5-default (on Ubuntu 16) for qmake to work. Is this intended? This gives quite a signifacant overhead. Does anybody know a way, to use qmake on Ubuntu 16 wihtout getting the whole Qt instalation on board?
Upvotes: 2
Views: 1171
Reputation: 593
You don't actually need Qt installed for qmake to work. The reason why you need qt5-default
is that most linux distributions provide both Qt5 and Qt4, which have the same binaries, for example they both have a version of qmake
, which would both get installed to /usr/bin
. In order to fix that problem Qt5 installs to /usr/lib/.../qt5
and Qt4 to /usr/lib/.../qt4
, and the qt5-default
package creates symlinks from there to /usr/bin
For Ubuntu , ...
is x86_64-linux-gnu
!
You can choose between:
qt5-qmake
package in your docker container and create a symlink /usr/bin/qmake
-> /usr/lib/.../qt5
.*/usr/lib/.../qt5/bin
to your $PATH
* The proper place for a manually created symlink would actually be /usr/local/bin
because if you have the symlink in /usr/bin
, installing qt5-default
package would fail because the symlink qt5-default
wants to create would already exist. However, you are in a docker container and can actually control whether qt5-default
gets installed, and if you create the symlink in /usr/local/bin
you have to make sure to add /usr/local/bin
to your $PATH
, which is overkill for that scenario.
Upvotes: 2