[vlc-commits] [Git][videolan/vlc][master] qt: fix compilation when Qt5X11Extra is missing

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Oct 4 15:59:40 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
6d8a3370 by Pierre Lamot at 2023-10-04T15:24:10+00:00
qt: fix compilation when Qt5X11Extra is missing

X11 compositor is no longer build when Qt5X11Extra is missing

QT5_HAS_XCB flag has been removed as it had no use

vlc_qt_check was passed wayland flags

- - - - -


2 changed files:

- modules/gui/qt/Makefile.am
- modules/gui/qt/maininterface/compositor.cpp


Changes:

=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -41,20 +41,19 @@ libqt_plugin_la_LDFLAGS = $(AM_LDFLAGS)
 if HAVE_DARWIN
 libqt_plugin_la_LDFLAGS += -Wl,-framework,Cocoa
 endif
-if HAVE_QT5_X11
-libqt_plugin_la_CXXFLAGS += $(QT5_X11_CFLAGS) -DQT5_HAS_X11
-libqt_plugin_la_LIBADD += $(QT5_X11_LIBS) $(X_LIBS) $(X_PRE_LIB) -lX11
-vlc_qt_check_CPPFLAGS += $(QT5_WAYLAND_CFLAGS) -DQT5_HAS_X11
-endif
 
 if HAVE_XCB
-libqt_plugin_la_CXXFLAGS += -DQT5_HAS_XCB $(XCB_CFLAGS)
-libqt_plugin_la_LIBADD += $(XCB_LIBS)
+libqt_plugin_la_CXXFLAGS += $(XCB_CFLAGS)  -DQT5_HAS_X11
+libqt_plugin_la_LIBADD += $(XCB_LIBS) $(X_LIBS) $(X_PRE_LIB) -lX11
+vlc_qt_check_CXXFLAGS += $(XCB_CFLAGS) -DQT5_HAS_X11
+
+if HAVE_QT5_X11
 if HAVE_XCB_DAMAGE
 if HAVE_XCB_XFIXES
 libqt_plugin_la_CXXFLAGS += -DQT5_HAS_X11_COMPOSITOR \
-        $(XCB_RENDER_CFLAGS) $(XCB_COMPOSITE_CFLAGS) $(XLCB_DAMAGE_CFLAGS) $(XCB_XFIXES_CFLAGS)
-libqt_plugin_la_LIBADD += $(XCB_RENDER_LIBS) $(XCB_COMPOSITE_LIBS) $(XCB_DAMAGE_LIBS) $(XCB_XFIXES_LIBS)
+	$(QT5_X11_CFLAGS) $(XCB_RENDER_CFLAGS) $(XCB_COMPOSITE_CFLAGS) $(XLCB_DAMAGE_CFLAGS) $(XCB_XFIXES_CFLAGS)
+libqt_plugin_la_LIBADD += $(QT5_X11_LIBS) $(XCB_RENDER_LIBS) $(XCB_COMPOSITE_LIBS) $(XCB_DAMAGE_LIBS) $(XCB_XFIXES_LIBS)
+endif
 endif
 endif
 endif
@@ -365,6 +364,7 @@ endif
 
 endif
 
+if HAVE_QT5_X11
 if HAVE_XCB
 if HAVE_XCB_DAMAGE
 if HAVE_XCB_XFIXES
@@ -382,6 +382,7 @@ libqt_plugin_la_SOURCES += \
 endif
 endif
 endif
+endif
 
 # Meta-object compilation
 
@@ -536,6 +537,7 @@ endif
 
 endif
 
+if HAVE_QT5_X11
 if HAVE_XCB
 if HAVE_XCB_DAMAGE
 if HAVE_XCB_XFIXES
@@ -548,6 +550,7 @@ nodist_libqt_plugin_la_SOURCES += \
 endif
 endif
 endif
+endif
 
 nodist_libqt_plugin_la_SOURCES += \
 	gui/qt/dialogs/extended/ui_equalizer.h \


=====================================
modules/gui/qt/maininterface/compositor.cpp
=====================================
@@ -32,7 +32,7 @@
 #  include "compositor_win7.hpp"
 #endif
 
-#ifdef QT5_HAS_XCB
+#ifdef QT5_HAS_X11_COMPOSITOR
 #  include "compositor_x11.hpp"
 #endif
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6d8a33705160a703ed46feb3068a1e1ea9e45bee

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6d8a33705160a703ed46feb3068a1e1ea9e45bee
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list