On Sat, Jul 09, 2016 at 07:36:53PM +0200, Kornel Benko wrote:
> Am Samstag, 9. Juli 2016 um 18:43:50, schrieb Enrico Forestieri 
> <for...@lyx.org>
> > 
> > Please, can you also check what has to be done for Qt4? The problem
> > is that I have to use a X11 function and thus the X11 library should
> > be added for the final link step, as already done for autotools.
> 
> Have I overseen  HAVE_QT4_X11_EXTRAS in your patch?

There is no Qt4X11Extras module.

> We check for  QX11Info in development/cmake/ConfigureChecks.cmake:231
> The class QX11Info is only available if qt4 uses X11.
> What more do you need?

That in the final link step -lX11 is added to the required libraries
if Qt4 uses X11 as a backend.

Then, looking at development/cmake/ConfigureChecks.cmake, it seems to
me that QT_USES_X11 is correctly set for Qt4, because the QX11Info header
is always installed on all platforms and compilation fails if X11 is
not the correct backend. This is not true for Qt5, as QtX11Extras/QX11Info
is only present if the Qt5X11Extras module is installed, and not otherwise.
So, compilation of the code snippet at lines 212-216 may fail even if X11
is the backend, so that QT_USES_X11 may not be correctly guessed with Qt5.

-- 
Enrico

Reply via email to