Commit 96d10f50 authored by Rafaël Carré's avatar Rafaël Carré

Qt: use QX11Info on Qt5 when present

parent 15d85d8b
......@@ -3730,6 +3730,10 @@ 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])
])
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])
......
......@@ -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
......
......@@ -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>
......
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