diff --git a/modules/Makefile.am b/modules/Makefile.am index 53b90a2713..5e2151a051 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -3,6 +3,7 @@ check_LTLIBRARIES = pkglib_LTLIBRARIES = noinst_HEADERS = check_PROGRAMS = +pkglibexec_PROGRAMS = EXTRA_DIST = EXTRA_SUBDIRS = \ diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am index cb77b14d96..a48677be92 100644 --- a/modules/gui/qt/Makefile.am +++ b/modules/gui/qt/Makefile.am @@ -448,7 +448,14 @@ nodist_libqt_plugin_la_SOURCES += gui/qt/resources.cpp gui/qt/resources.cpp: gui/qt/vlc.qrc $(libqt_plugin_la_RES) $(AM_V_GEN)$(RCC) -name vlc -o $@ $< +vlc_qt_check_SOURCES = gui/qt/vlc-qt-check.cpp +vlc_qt_check_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) -fPIC +vlc_qt_check_LDADD = $(QT_LIBS) + if ENABLE_QT gui_LTLIBRARIES += libqt_plugin.la BUILT_SOURCES += $(nodist_libqt_plugin_la_SOURCES) +if !HAVE_WIN32 +pkglibexec_PROGRAMS += vlc-qt-check +endif endif diff --git a/modules/gui/qt/vlc-qt-check.cpp b/modules/gui/qt/vlc-qt-check.cpp new file mode 100644 index 0000000000..685238c88b --- /dev/null +++ b/modules/gui/qt/vlc-qt-check.cpp @@ -0,0 +1,30 @@ +/***************************************************************************** + * vlc-qt-check.cpp: run-time Qt availability test + **************************************************************************** + * Copyright © 2018 Rémi Denis-Courmont + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + *****************************************************************************/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); +}