[vlc-devel] [PATCH 3.0 08/10] contrib: qt: force release CFLAGS/CXXFLAGS when building for Windows

Steve Lhomme robux4 at ycbcr.xyz
Fri Aug 21 13:41:02 CEST 2020


Now that we export them in the win32 build environment they are used for
everything Qt builds. But Qt doesn't like to have pthread-GC2 in the include
path. So we use a version without -I$(PREFIX)/include.

We always make release builds so we can use "-g O2".
---
 contrib/src/qt/rules.mak | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak
index d70bcbc3a9..7894cffd46 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -42,6 +42,7 @@ ifdef HAVE_MACOSX
 QT_PLATFORM := -platform darwin-g++
 endif
 ifdef HAVE_WIN32
+QT_VARS := CFLAGS="-g -O2" CXXFLAGS="-g -O2 $(EXTRA_CXXFLAGS)"
 ifdef HAVE_CLANG
 QT_SPEC := win32-clang-g++
 else
@@ -58,7 +59,7 @@ QT_CONFIG := -static -opensource -confirm-license -no-pkg-config \
 QT_CONFIG += -release
 
 .qt: qt
-	cd $< && ./configure $(QT_PLATFORM) $(QT_CONFIG) -prefix $(PREFIX)
+	cd $< && $(QT_VARS) ./configure $(QT_PLATFORM) $(QT_CONFIG) -prefix $(PREFIX)
 	# Make && Install libraries
 	cd $< && $(MAKE)
 	cd $< && $(MAKE) -C src sub-corelib-install_subtargets sub-gui-install_subtargets sub-widgets-install_subtargets sub-platformsupport-install_subtargets sub-zlib-install_subtargets sub-bootstrap-install_subtargets
-- 
2.26.2



More information about the vlc-devel mailing list