[vlc-devel] [PATCH 2/2] doc: QtGL: use defines for static Qt / plugins

Alexandre Janniaux ajanni at videolabs.io
Mon Nov 9 14:43:01 CET 2020


Only import static plugin if QT_STATIC is defined, like the VLC Qt GUI
code, so that it links correctly on Linux with dynamic Qt.
---
 doc/libvlc/QtGL/main.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/doc/libvlc/QtGL/main.cpp b/doc/libvlc/QtGL/main.cpp
index 1e86fe8245..564c83dd27 100644
--- a/doc/libvlc/QtGL/main.cpp
+++ b/doc/libvlc/QtGL/main.cpp
@@ -3,8 +3,12 @@
 #include <QSurfaceFormat>
 #include <QMainWindow>
 
-#include <QtPlugin>
+#ifdef QT_STATIC
+# include <QtPlugin>
+#ifdef QT_STATICPLUGIN
 Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
+#endif
+#endif
 
 
 #include "qtvlcwidget.h"
-- 
2.29.2



More information about the vlc-devel mailing list