Commit ba49030b authored by Rafaël Carré's avatar Rafaël Carré Committed by Jean-Baptiste Kempf

Qt: use QX11Info on Qt5 when present

(cherry picked from commit 96d10f508bb9fb59f6396329f692923eb266ff0d)
(cherry picked from commit 70b074a2d175458f1d4cac79726c1921507da7de)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 760cb7ec
...@@ -3709,6 +3709,12 @@ AC_ARG_ENABLE(qt, [ ...@@ -3709,6 +3709,12 @@ AC_ARG_ENABLE(qt, [
]) ])
AS_IF([test "${enable_qt}" != "no"], [ AS_IF([test "${enable_qt}" != "no"], [
PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [ 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_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins 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]) AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, [${QT_HOST_PATH} ${QT_PATH}/bin ${CONTRIB_DIR}/bin])
......
...@@ -14,8 +14,8 @@ guidir = $(pluginsdir)/gui ...@@ -14,8 +14,8 @@ guidir = $(pluginsdir)/gui
SUFFIXES += .ui .h .hpp .moc.cpp SUFFIXES += .ui .h .hpp .moc.cpp
libqt4_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) libqt4_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt4)
libqt4_plugin_la_LIBADD = $(QT_LIBS) libqt4_plugin_la_LIBADD = $(QT_LIBS) $(LIBS_qt4)
libqt4_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' libqt4_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)'
if HAVE_OS2 if HAVE_OS2
else else
......
...@@ -52,6 +52,10 @@ ...@@ -52,6 +52,10 @@
#include <QBitmap> #include <QBitmap>
#include <QUrl> #include <QUrl>
#ifdef QT5_HAS_X11
# define Q_WS_X11
#endif
#ifdef Q_WS_X11 #ifdef Q_WS_X11
# include <X11/Xlib.h> # include <X11/Xlib.h>
# include <qx11info_x11.h> # include <qx11info_x11.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment