summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-12-14 09:54:33 +0100
committerMichal Klocek <michal.klocek@qt.io>2022-02-22 15:02:29 +0100
commitb5999fde35058112c1d7a4add71c72da3fdb4f00 (patch)
tree0d9d99f37d98fb558283308d3e8e618b8ecb0be7 /libexec
parentd90baae24fad97768370beff8fc675297926fc6e (diff)
Install 3rdparty headers for static builds
For static builds we need 3rdparty headers to be installed. Leaf modules like qtwebengine needs 3rdparty libs and header for zlib, freetype, harfbuzz, png, jpeg. Without those the Chromium bundled versions are used, however it might end up badly if qt has already bundled one. Introduce new header only modules with additional arguments for qt_internal_add_module: * EXTERNAL_HEADERS to pick exactly which headers are public * EXTERNAL_HEADERS_DIR to include whole directory preserving the files directory structure Fix qtsync so it keep directory structure for all non-qt modules when syncing headers and do not generate warnings for headers files. Task-number: QTBUG-87154 Task-number: QTBUG-88614 Change-Id: If1c27bf8608791cd4e0a21839d6316a445a96e9f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit be2745e4788cecb0d3122081e3328e4b66923609)
Diffstat (limited to 'libexec')
-rwxr-xr-xlibexec/syncqt.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/libexec/syncqt.pl b/libexec/syncqt.pl
index 593401bfe8..21945e0db8 100755
--- a/libexec/syncqt.pl
+++ b/libexec/syncqt.pl
@@ -1095,7 +1095,9 @@ foreach my $lib (@modules_to_sync) {
# We need both $public_header and $private_header because QPA headers count as neither
my $private_header = !$public_header && !$qpa_header
&& $header =~ /_p\.h$/ && $subdir !~ /3rdparty/;
- check_header($lib, $header, $iheader, $public_header, $private_header);
+ if ($is_qt) { # skip check since this header is not qt header
+ check_header($lib, $header, $iheader, $public_header, $private_header);
+ }
}
my @classes = ();
push @classes, classNames($iheader, \$clean_header, \$requires)
@@ -1112,7 +1114,13 @@ foreach my $lib (@modules_to_sync) {
#find out all the places it goes..
my $oheader;
if ($public_header) {
- $oheader = "$out_basedir/include/$lib/$header";
+ if ($is_qt || $headers_dir eq $subdir) { # this is qt header or header is not in subdirectory
+ $oheader = "$out_basedir/include/$lib/$header";
+ } else {
+ my $subdirname = $subdir;
+ $subdirname =~ s/^$headers_dir//;
+ $oheader = "$out_basedir/include/$lib/$subdirname/$header"; # keep subdirectory name
+ }
foreach my $full_class (@classes) {
my $header_base = basename($header);
# Strip namespaces: