[vlc-commits] [Git][videolan/vlc][master] qt: correct bad link ordering

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Aug 27 14:25:47 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
bf7e2b21 by Fatih Uzunoglu at 2023-08-27T14:10:53+00:00
qt: correct bad link ordering

Qt plugin libs depend on Qt libs, not
the other way around. They should appear
first when telling the linker.

- - - - -


2 changed files:

- modules/gui/qt/Makefile.am
- modules/gui/qt/meson.build


Changes:

=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -13,10 +13,12 @@
 
 SUFFIXES += .ui .h .hpp .moc.cpp .qml
 
+vlc_qt_libs = $(QT5_PLUGINS_LIBS) $(QT5_PLATFORM_PLUGINS_LIBS) $(QT5_XCB_PLUGINS_LIBS) $(QT5_WAYLAND_PLUGINS_LIBS) $(QT_LIBS) $(LIBS_qt)
+
 vlc_qt_check_SOURCES = gui/qt/vlc-qt-check.cpp gui/qt/plugins.hpp
 vlc_qt_check_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) -fPIC $(CXXFLAGS_qt)
 vlc_qt_check_CPPFLAGS = $(AM_CPPFLAGS)
-vlc_qt_check_LDADD = $(QT_LIBS) $(LIBS_qt) $(QT5_PLUGINS_LIBS) $(QT5_PLATFORM_PLUGINS_LIBS) $(QT5_XCB_PLUGINS_LIBS) $(QT5_WAYLAND_PLUGINS_LIBS)
+vlc_qt_check_LDADD = $(vlc_qt_libs)
 
 libqt_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
 	-I$(srcdir)/gui/qt -I$(builddir)/gui/qt/ \
@@ -33,8 +35,7 @@ libqt_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
 	-DQPNI_HEADER=\<$(QT_VERSION)/QtGui/qpa/qplatformnativeinterface.h\>
 
 libqt_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt)
-libqt_plugin_la_LIBADD = $(QT_LIBS) $(LIBS_qt) $(LIBM) \
-                         $(QT5_PLUGINS_LIBS) $(QT5_PLATFORM_PLUGINS_LIBS)
+libqt_plugin_la_LIBADD = $(vlc_qt_libs)
 libqt_plugin_la_LDFLAGS = $(AM_LDFLAGS)
 if HAVE_DARWIN
 libqt_plugin_la_LDFLAGS += -Wl,-framework,Cocoa
@@ -1152,7 +1153,7 @@ if HAVE_QMLCACHE
 nodist_qml_test_SOURCES += gui/qt/qmlcache_loader.cpp $(libqt_plugin_la_QML)
 endif
 qml_test_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) -fPIC $(CXXFLAGS_qt) ${QT5_QUICK_TEST_CFLAGS} -DQUICK_TEST_SOURCE_DIR="\"${srcdir}/gui/qt/tests\""
-qml_test_LDADD = $(QT_LIBS) $(LIBS_qt) $(QT5_PLUGINS_LIBS) ${QT5_QUICK_TEST_LIBS}
+qml_test_LDADD = $(QT5_PLUGINS_LIBS) ${QT5_QUICK_TEST_LIBS} $(QT_LIBS) $(LIBS_qt)
 check_PROGRAMS += qml_test
 EXTRA_DIST += gui/qt/tests/tst_FSM.qml
 


=====================================
modules/gui/qt/meson.build
=====================================
@@ -689,7 +689,7 @@ if qt5_dep.found()
     vlc_modules += {
         'name' : 'qt',
         'sources' : [qt5pre_files, qt5pre_qrc, qt_sources, some_sources],
-        'dependencies' : [qt5_dep, qt_extra_deps],
+        'dependencies' : [qt_extra_deps, qt5_dep],
         'include_directories' : qt_include_dir,
         'c_args' : qt_extra_flags,
         'cpp_args' : [qt_extra_flags, qt_cppargs]



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bf7e2b2192a425cc2df08465d3d31217c14762ab
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