[vlc-commits] Qt: use QX11Info on Qt5 when present
Rafaël Carré
git at videolan.org
Sat Aug 2 22:29:51 CEST 2014
vlc/vlc-2.2 | branch: master | Rafaël Carré <funman at videolan.org> | Wed Jul 30 12:16:52 2014 +0200| [ba49030bcc2f4f3fb48fea1cf73a2058eb34c140] | committer: Jean-Baptiste Kempf
Qt: use QX11Info on Qt5 when present
(cherry picked from commit 96d10f508bb9fb59f6396329f692923eb266ff0d)
(cherry picked from commit 70b074a2d175458f1d4cac79726c1921507da7de)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ba49030bcc2f4f3fb48fea1cf73a2058eb34c140
---
configure.ac | 6 ++++++
modules/gui/qt4/Makefile.am | 4 ++--
modules/gui/qt4/components/interface_widgets.cpp | 4 ++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index e5e4fcd..953a58a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3709,6 +3709,12 @@ AC_ARG_ENABLE(qt, [
])
AS_IF([test "${enable_qt}" != "no"], [
PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [
+ PKG_CHECK_MODULES([QTX11], [Qt5X11Extras], [
+ VLC_ADD_LIBS([qt4],[${QTX11_LIBS}])
+ VLC_ADD_CXXFLAGS([qt4],[${QTX11_CFLAGS} -DQT5_HAS_X11])
+ ],[
+ AC_MSG_WARN([Not building Qt Interface with X11 helpers.])
+ ])
QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, [${QT_HOST_PATH} ${QT_PATH}/bin ${CONTRIB_DIR}/bin])
diff --git a/modules/gui/qt4/Makefile.am b/modules/gui/qt4/Makefile.am
index a4fec79..c608999 100644
--- a/modules/gui/qt4/Makefile.am
+++ b/modules/gui/qt4/Makefile.am
@@ -14,8 +14,8 @@ guidir = $(pluginsdir)/gui
SUFFIXES += .ui .h .hpp .moc.cpp
-libqt4_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS)
-libqt4_plugin_la_LIBADD = $(QT_LIBS)
+libqt4_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt4)
+libqt4_plugin_la_LIBADD = $(QT_LIBS) $(LIBS_qt4)
libqt4_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)'
if HAVE_OS2
else
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 84babdb..aaf1975 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -52,6 +52,10 @@
#include <QBitmap>
#include <QUrl>
+#ifdef QT5_HAS_X11
+# define Q_WS_X11
+#endif
+
#ifdef Q_WS_X11
# include <X11/Xlib.h>
# include <qx11info_x11.h>
More information about the vlc-commits
mailing list