[vlc-commits] [Git][videolan/vlc][master] contrib: qt: always add includedir to the .pc file
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Jan 24 16:37:30 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
b024c077 by Johannes Kauffmann at 2023-01-24T14:51:39+00:00
contrib: qt: always add includedir to the .pc file
The generated .pc files do not contain -I${includedir}, only
-I${includedir}/$QTMODULE. This is because QMake finds out that our
standard contrib include path is already in the QMAKE_DEFAULT_INCDIRS
list.
When this includepath is not forced externally through some script and
only the .pc file flags are used for the qt plugin, the build fails:
In file included from /vlc/contrib/x86_64-linux-gnu/include/QtWidgets/QApplication:1,
from ../modules/gui/qt/vlc-qt-check.cpp:26:
/vlc/contrib/x86_64-linux-gnu/include/QtWidgets/qapplication.h:43:10: fatal error: QtWidgets/qtwidgetsglobal.h: No such file or directory
43 | #include <QtWidgets/qtwidgetsglobal.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes #27588.
- - - - -
2 changed files:
- + contrib/src/qt/add-includedir-to-pc-file.patch
- contrib/src/qt/rules.mak
Changes:
=====================================
contrib/src/qt/add-includedir-to-pc-file.patch
=====================================
@@ -0,0 +1,41 @@
+From 3114853cdc19b35ca9a312321e4014319e5828fa Mon Sep 17 00:00:00 2001
+From: Johannes Kauffmann <johanneskauffmann at hotmail.com>
+Date: Mon, 12 Dec 2022 13:36:45 +0100
+Subject: [PATCH] qmake: always add includedir to the .pc files
+
+The generated .pc files do not contain -I${includedir}, only
+-I${includedir}/$QTMODULE. This is because QMake finds out that our
+standard contrib include path is already in the QMAKE_DEFAULT_INCDIRS
+list.
+
+When this includepath is not forced externally through some script and
+only the .pc file flags are used for the qt plugin, the build fails:
+
+In file included from /vlc/contrib/x86_64-linux-gnu/include/QtWidgets/QApplication:1,
+ from ../modules/gui/qt/vlc-qt-check.cpp:26:
+/vlc/contrib/x86_64-linux-gnu/include/QtWidgets/qapplication.h:43:10: fatal error: QtWidgets/qtwidgetsglobal.h: No such file or directory
+ 43 | #include <QtWidgets/qtwidgetsglobal.h>
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Fixes #27588.
+---
+ qmake/generators/makefile.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
+index 5c61a3c65c..ab9d696440 100644
+--- a/qmake/generators/makefile.cpp
++++ b/qmake/generators/makefile.cpp
+@@ -3388,8 +3388,7 @@ MakefileGenerator::writePkgConfigFile()
+ << varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ")
+ // << varGlue("DEFINES","-D"," -D"," ")
+ ;
+- if (!project->values("QMAKE_DEFAULT_INCDIRS").contains(includeDir))
+- t << "-I${includedir}";
++ t << "-I${includedir}";
+ if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle")
+ && libDir != QLatin1String("/Library/Frameworks")) {
+ t << " -F${libdir}";
+--
+2.34.1
+
=====================================
contrib/src/qt/rules.mak
=====================================
@@ -47,6 +47,8 @@ qt: qtbase-everywhere-src-$(QT_VERSION_FULL).tar.xz .sum-qt
$(APPLY) $(SRC)/qt/set-mkspecs-properties.patch
# fix missing QMAKE_PKGCONFIG_VERSION in Windows targets
$(APPLY) $(SRC)/qt/set-mkspecs-version.patch
+ # don't omit -I${includedir} from .pc files when forcing -I$CONTRIB/include
+ $(APPLY) $(SRC)/qt/add-includedir-to-pc-file.patch
# fix detection of our harfbuzz on macosx
sed -i.orig 's#"-lharfbuzz"#{ "libs": "-framework CoreText -framework CoreGraphics -framework CoreFoundation -lharfbuzz", "condition": "config.darwin" }, "-lharfbuzz"#' "$(UNPACK_DIR)/src/gui/configure.json"
# Let us decide the WINVER/_WIN32_WINNT
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b024c077120ee14530fc2f95b31b997acad3b2ed
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b024c077120ee14530fc2f95b31b997acad3b2ed
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