On Monday, 16 September 2013 18:39:45 CEST, Pali Rohár wrote:
What is bad on using here also my wrapper trojita_find_package?

Qt5 upstream recommends [1] using qt5_use_modules for specifying which of the many Qt5 modules are needed by each target. Before this macro is available, though, one has to somehow "import" it to cmake, and it's easiest to do this via a call to find_package(Qt5Core).

The Qt projects uses wonky options when dealing with cmake (see the section about "imported targets" etc). I do not want to waste time learning their implementation details -- the important message is that they are using cmake in a "creative" or "unusual" way, and the more we make *our* setup boring the better.

Why do I want to use qt5_use_modules? Because it is very convenient. When I switched to it, it simplified the cmake code a lot. I do not want to go back.

Now, why don't I want to have your wrappers in place? It's possible that having both "boring setup", i.e. just find_package(Qt5Core) and a couple of qt5_use_modules, as well as your fancy wrapping used together at the same time would work. It's even possible that it won't introduce a single problem, ever -- perhaps. The point is that we don't know that at this point. What I do know is that it introduces an extra code which is not actually needed and that I'm not familiar with. What's the added value of that code? You have an answer, apparently:

My wrapper will automatically call also set_package_properties() which will show this qt5core package in future summary as required package.

Do you think that this is worth duplicating the list of required Qt5 modules? Do you believe that someone will have troubles interpretting the error message as "hey, this is a Qt app, I have to install the packages, doh"?

Calling qt5_use_modules with dbus is needed only for targets which using dbus library, right?

Right.

[1] http://qt-project.org/doc/qt-5.0/qtdoc/cmake-manual.html

--
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/

Reply via email to