[cmake-developers] fix-OSX-bundle-rpaths-and-Qt5 topic

Adam Strzelecki ono at java.pl
Mon Oct 13 16:04:41 EDT 2014


> Side note: this is not a fair characterization of Qt's support for CMake.
> (…)
> Furthermore, all the CMake-related files come with Qt5 and are maintained
> there rather than in CMake.  This is much easier than Qt4, where FindQt4
> in CMake has needed maintenance with every new upstream version.

Of course it is great that THEY provide official CMake support. Maybe "half-baked" is a bit harsh, but everything goes smooth until you try to run your freshly compiled Qt5 app in on the any other machine that the one it was compiled on.

First you realize you miss some Qt libraries you were linking to. Fine, fixup_bundle should do the job, but it doesn't.

----
$ hello.app/Contents/MacOS/hello 
This application failed to start because it could not find or load the Qt platform plugin "cocoa".

Available platform plugins are: cocoa, minimal, offscreen.

Reinstalling the application may fix this problem.
----

The message isn't really helpful.

Finally after seeking googling for an answer you find out that there are "platform plugins" and there is no function or module that will help you to bundle them and create proper qt.conf. So all apps that are willing to use Qt5 (not Qt4 legacy version) need to have that manually.

This is why I call it half-baked.

But to be fair, Qt team is really welcoming and open for improvements, I am sure complete support will arrive sooner or later.

FYI I was working hard on relocatable Qt SDK for OSX for a while, it is almost complete. We were to release it for 5.4 but due some fancy testing suite problems probably this will be delayed. This was one of the reasons of my rpath support here. Otherwise once Qt SDK uses rpath it will immediately break CMake compatibility.

--Adam


More information about the cmake-developers mailing list