[vlc-commits] [Git][videolan/vlc][master] 2 commits: contrib: qt: pass through correct QMake link flags
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Oct 13 14:07:24 UTC 2022
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
c9cf4990 by Johannes Kauffmann at 2022-10-13T12:19:05+00:00
contrib: qt: pass through correct QMake link flags
QMAKE_LDFLAGS does not exist [1].
The contrib libdir needs to be added to the linker flags in order to
link to system libraries (e.g. zlib) during conftest.
1. https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-lflags
- - - - -
80a321ad by Johannes Kauffmann at 2022-10-13T12:19:05+00:00
contrib: qt: use system zlib
This was attempted in 4f72f199f20530803227ca09478d6004a0bb9703, but
back then, qtsvg still needed the Qt vendored zlib. Now, this has been
fixed and we don't need the vendored zlib. zlib from the contribs has a
few fixes [1] over the Qt version, so it is prefered.
Just like the explicit -qt-zlib, we specify -system-zlib so we don't
rely on the automatic fallback to the vendored version. Since this fails
at configure time, it has been helpful when hacking away at the compiler
flags and options.
1. https://github.com/madler/zlib/blob/master/ChangeLog
- - - - -
2 changed files:
- contrib/src/qt/0001-allow-to-pass-user-defined-compilation-flags-to-qt.patch
- contrib/src/qt/rules.mak
Changes:
=====================================
contrib/src/qt/0001-allow-to-pass-user-defined-compilation-flags-to-qt.patch
=====================================
@@ -19,7 +19,7 @@ index 85955f7..8602b78 100644
+QMAKE_CFLAGS += $${VLC_EXTRA_CFLAGS}
+QMAKE_CXXFLAGS += $${VLC_EXTRA_CXXFLAGS}
-+QMAKE_LDFLAGS += $${VLC_EXTRA_LDFLAGS}
++QMAKE_LFLAGS += $${VLC_EXTRA_LDFLAGS}
+
load(qt_config)
diff --git a/mkspecs/win32-clang-g++/qmake.conf b/mkspecs/win32-clang-g++/qmake.conf
@@ -32,7 +32,7 @@ index 4630ec4..149f779 100644
+QMAKE_CFLAGS += $${VLC_EXTRA_CFLAGS}
+QMAKE_CXXFLAGS += $${VLC_EXTRA_CXXFLAGS}
-+QMAKE_LDFLAGS += $${VLC_EXTRA_LDFLAGS}
++QMAKE_LFLAGS += $${VLC_EXTRA_LDFLAGS}
+
load(qt_config)
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
@@ -45,7 +45,7 @@ index 5e99233..b22cbce 100644
+QMAKE_CFLAGS += $${VLC_EXTRA_CFLAGS}
+QMAKE_CXXFLAGS += $${VLC_EXTRA_CXXFLAGS}
-+QMAKE_LDFLAGS += $${VLC_EXTRA_LDFLAGS}
++QMAKE_LFLAGS += $${VLC_EXTRA_LDFLAGS}
+
load(qt_config)
--
=====================================
contrib/src/qt/rules.mak
=====================================
@@ -20,6 +20,8 @@ DEPS_qt += wine-headers
endif
endif
+DEPS_qt += zlib $(DEPS_zlib)
+
ifeq ($(call need_pkg,"Qt5Core >= 5.11 Qt5Gui Qt5Widgets"),)
PKGS_FOUND += qt
endif
@@ -89,12 +91,14 @@ endif
endif
QT_PLATFORM += -device-option VLC_EXTRA_CFLAGS="-isystem $(PREFIX)/include" \
- -device-option VLC_EXTRA_CXXFLAGS="-isystem $(PREFIX)/include"
+ -device-option VLC_EXTRA_CXXFLAGS="-isystem $(PREFIX)/include" \
+ -device-option VLC_EXTRA_LDFLAGS="-L$(PREFIX)/lib"
QT_CONFIG := -static -no-shared -opensource -confirm-license -no-pkg-config \
-no-sql-sqlite -no-gif -qt-libjpeg -no-openssl $(QT_OPENGL) -no-dbus \
-no-vulkan -no-sql-odbc -no-pch -no-feature-testlib \
- -no-compile-examples -nomake examples -nomake tests -qt-zlib
+ -no-compile-examples -nomake examples -nomake tests \
+ -system-zlib
QT_CONFIG += -skip qtsql
QT_CONFIG += -release
@@ -122,7 +126,6 @@ QT_QINSTALL="$(shell cd $(SRC)/qt/; pwd -P)/install_wrapper.sh"
sub-gui-install_subtargets \
sub-widgets-install_subtargets \
sub-platformsupport-install_subtargets \
- sub-zlib-install_subtargets \
sub-bootstrap-install_subtargets \
sub-network-install_subtargets
# Install tools
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4ddfb4474df8547453b928d52f09b1f4013d3f02...80a321ad99db3799fa25dc20a770f0af97f43f95
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4ddfb4474df8547453b928d52f09b1f4013d3f02...80a321ad99db3799fa25dc20a770f0af97f43f95
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