The QT spec says we should use QT_STATICPLUGIN defined if building a
static plugin.
As we are using out own makefile and not a qt .pro project we have to
define it ourselves.
This is then used to decide if we should import the modules
QWindowsIntegrationPlugin and AccessibleFactory as these are not needed
on a shared build.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
#ifdef _WIN32 /* For static builds */
#include <QtPlugin>
#if HAS_QT5
- Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
- Q_IMPORT_PLUGIN(AccessibleFactory)
+ #ifdef QT_STATICPLUGIN
+ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
+ Q_IMPORT_PLUGIN(AccessibleFactory)
+ #endif
#else
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qtaccessiblewidgets)
#include <vlc_interface.h> /* intf_thread_t */
#include <vlc_playlist.h> /* playlist_t */
+#include <qconfig.h>
+
+#ifdef QT_STATIC
+#define QT_STATICPLUGIN
+#endif
+
#define QT_NO_CAST_TO_ASCII
#include <QString>