Martchus 2020-04-15 11:18:19 +02:00
parent 9f7f3560f1
commit 24fde84312
39 changed files with 879 additions and 616 deletions

View File

@ -1,2 +1,2 @@
#!/usr/bin/bash -e
"$(dirname "$0")/../sync-variants.sh" qt5-base mingw-w64 mingw-w64-{static,opengl,angle}
"$(dirname "$0")/../sync-variants.sh" qt5-base mingw-w64 mingw-w64-{static,opengl,angle,dynamic}

View File

@ -1,7 +1,7 @@
From 07a334d39698cc7d2826ed1b5b6cb9b67dd4def8 Mon Sep 17 00:00:00 2001
From c416378bd70ab26f9ce9e34fe72a364dd19bae73 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 18:30:51 +0100
Subject: [PATCH 01/33] Adjust win32-g++ profile for cross compilation with
Subject: [PATCH 01/31] Adjust win32-g++ profile for cross compilation with
mingw-w64
Adding a new, separate mkspec instead of patching the existing one
@ -12,6 +12,8 @@ So for this to work, the mkspec must be called win32-g++.
Also see the following issues:
* https://github.com/Martchus/PKGBUILDs/issues/59
* https://github.com/Martchus/PKGBUILDs/issues/60
Change-Id: I4c9b3c170ed13943abe0d8b397a8cb9e360538b6
---
mkspecs/common/g++-win32.conf | 52 ++++++++++++++++++++----------
mkspecs/win32-clang-g++/qmake.conf | 4 +--
@ -125,7 +127,7 @@ index c3a1f3a373..5208d22bd6 100644
-include(angle.conf)
-include(windows-vulkan.conf)
diff --git a/mkspecs/win32-clang-g++/qmake.conf b/mkspecs/win32-clang-g++/qmake.conf
index 4630ec4602..3f9fdc72b1 100644
index 59d42176f0..f8cb9859f2 100644
--- a/mkspecs/win32-clang-g++/qmake.conf
+++ b/mkspecs/win32-clang-g++/qmake.conf
@@ -14,11 +14,11 @@ include(../common/g++-win32.conf)
@ -161,5 +163,5 @@ index 5de482f23b..3c3d22c699 100644
QMAKE_LINK = $${CROSS_COMPILE}g++
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 2a4db9590232cb56102955d86e21e3c2482b28cf Mon Sep 17 00:00:00 2001
From 06380a45c2cb2f6882e7102fdd46bcdd9e4aba48 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:36:53 +0200
Subject: [PATCH 02/33] Ensure GLdouble is defined when using dynamic OpenGL
Subject: [PATCH 02/31] Ensure GLdouble is defined when using dynamic OpenGL
FIXME: Not sure whether this is still required
---
@ -23,5 +23,5 @@ index 4554291bbd..23d55bddeb 100644
#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
#include <stdio.h>
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From abcf04e70f4f3e8a0a7a584afcf976e209307265 Mon Sep 17 00:00:00 2001
From 40b1ebaa7481c339b437e976e760bf099df5c594 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:48:51 +0200
Subject: [PATCH 03/33] Fix too many sections assemler error in OpenGL factory
Subject: [PATCH 03/31] Fix too many sections assemler error in OpenGL factory
On x86_64 qopenglversionfunctionsfactory.o exceeds the
limit of 32768 sections.
@ -25,5 +25,5 @@ index 24758afdeb..aa04b4a672 100644
HEADERS += opengl/qopengl.h \
opengl/qopengl_p.h \
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 3887b9693805365272de6101eab5c332862960e3 Mon Sep 17 00:00:00 2001
From f1122d1929e271162eb062aad43097ad69c7159e Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:54:12 +0200
Subject: [PATCH 04/33] Make sure *.pc files are installed correctly
Subject: [PATCH 04/31] Make sure *.pc files are installed correctly
---
qmake/generators/makefile.cpp | 8 ++++++--
@ -10,10 +10,10 @@ Subject: [PATCH 04/33] Make sure *.pc files are installed correctly
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index b634ec622b..aac53cd0ea 100644
index 7e471f126c..f9532e0db9 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -3230,7 +3230,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const
@@ -3215,7 +3215,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const
}
QString
@ -22,7 +22,7 @@ index b634ec622b..aac53cd0ea 100644
{
QString ret = project->first("QMAKE_PKGCONFIG_FILE").toQString();
if (ret.isEmpty()) {
@@ -3255,7 +3255,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
@@ -3240,7 +3240,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
if(fixify) {
if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
ret.prepend(project->first("DESTDIR").toQString());
@ -36,10 +36,10 @@ index b634ec622b..aac53cd0ea 100644
return ret;
}
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 350ebd377a..d0c234b864 100644
index ab970c966f..01f97c61d4 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -92,7 +92,7 @@ protected:
@@ -96,7 +96,7 @@ protected:
virtual void writeDefaultVariables(QTextStream &t);
QString pkgConfigPrefix() const;
@ -49,10 +49,10 @@ index 350ebd377a..d0c234b864 100644
void writePkgConfigFile(); // for pkg-config
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 16f9361d13..d9887cd36d 100644
index 3ec2704625..f33edb5bd9 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -753,7 +753,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
@@ -775,7 +775,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
}
if(!ret.isEmpty())
ret += "\n\t";
@ -62,5 +62,5 @@ index 16f9361d13..d9887cd36d 100644
uninst.append("\n\t");
uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_pc));
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 2ebc0b00f1b3297e1f88d271123df7ecb0fbd955 Mon Sep 17 00:00:00 2001
From dc9860e99a09a4dc54cfe60959a34e06a288f7d6 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:58:28 +0200
Subject: [PATCH 05/33] Don't add resource files to LIBS parameter
Subject: [PATCH 05/31] Don't add resource files to LIBS parameter
Solves an issue where the generated pkg-config
files contained invalid Libs.private references
@ -11,10 +11,10 @@ like .obj/debug/Qt5Cored_resource_res.o
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index de7363e51b..b2b9d01799 100644
index 096b041056..eb498b28e8 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -209,7 +209,7 @@ void MingwMakefileGenerator::init()
@@ -152,7 +152,7 @@ void MingwMakefileGenerator::init()
processVars();
@ -24,5 +24,5 @@ index de7363e51b..b2b9d01799 100644
if (project->isActiveConfig("dll")) {
QString destDir = "";
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 00be29ae27f1954f8d9c7ca2f47c1d18f38e96b8 Mon Sep 17 00:00:00 2001
From 2cfd0a32516ba85f0c608fb81341090c28209750 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:01:14 +0200
Subject: [PATCH 06/33] Prevent debug library names in pkg-config files
Subject: [PATCH 06/31] Prevent debug library names in pkg-config files
qmake generates the pkgconfig .pc files two times, once for the
release build and once for the debug build (which we're not actually
@ -15,10 +15,10 @@ files for the debug build an unique file name.
1 file changed, 3 insertions(+)
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index aac53cd0ea..fedbaaf601 100644
index f9532e0db9..9c65f21ac0 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -3244,6 +3244,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
@@ -3229,6 +3229,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
if (dot != -1)
ret = ret.left(dot);
}
@ -29,5 +29,5 @@ index aac53cd0ea..fedbaaf601 100644
QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
if(!subdir.isEmpty()) {
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 6b429798b0e3eddc7e5c857cc3e5b9d7f70aa998 Mon Sep 17 00:00:00 2001
From 3e1b4e602c5a2569d9a337990a2e38e3ef82f251 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Thu, 26 Jan 2017 17:51:31 +0100
Subject: [PATCH 07/33] Fix linking against shared/static libpng
Subject: [PATCH 07/31] Fix linking against shared/static libpng
Change-Id: Ic7a0ec9544059b8e647a5d0186f1b88c00911dcf
---
@ -9,10 +9,10 @@ Change-Id: Ic7a0ec9544059b8e647a5d0186f1b88c00911dcf
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 6280b4dfa2..36325920cd 100644
index 0202f17b21..099c11da95 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -387,8 +387,10 @@
@@ -400,8 +400,10 @@
{ "type": "pkgConfig", "args": "libpng" },
{ "libs": "-llibpng16", "condition": "config.msvc" },
{ "libs": "-llibpng", "condition": "config.msvc" },
@ -26,5 +26,5 @@ index 6280b4dfa2..36325920cd 100644
],
"use": [
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From f7f14b714ac258239ba7d56aad81352ae013c299 Mon Sep 17 00:00:00 2001
From d54fefe4a033a39ba628858c18ab0a95520069f2 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 19:36:25 +0100
Subject: [PATCH 08/33] Fix linking against static D-Bus
Subject: [PATCH 08/31] Fix linking against static D-Bus
---
configure.json | 9 +++++++--
@ -9,10 +9,10 @@ Subject: [PATCH 08/33] Fix linking against static D-Bus
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/configure.json b/configure.json
index 7f3018ed23..9d8e93a227 100644
index 868f15db13..147cf9eb00 100644
--- a/configure.json
+++ b/configure.json
@@ -187,18 +187,23 @@
@@ -188,18 +188,23 @@
"dbus": {
"label": "D-Bus >= 1.2",
"test": {
@ -54,5 +54,5 @@ index 7cce0d71aa..4d3d774d45 100644
# include <dbus/dbus.h>
#else
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 663130ef2c1188a101b3ff1b88ccfe07712f628b Mon Sep 17 00:00:00 2001
From 012e5b2dfbc5de85412bb450970d0320e369da30 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Jun 2017 18:28:10 +0200
Subject: [PATCH 09/33] Don't try to use debug version of D-Bus library
Subject: [PATCH 09/31] Don't try to use debug version of D-Bus library
Required for a debug build of Qt because mingw-w64-dbus
does not contain debug version
@ -12,10 +12,10 @@ Change-Id: Ic34e1025fda55f9659e065f5bbe9d51f55420adb
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.json b/configure.json
index 9d8e93a227..80e15ce156 100644
index 147cf9eb00..a481e54b8d 100644
--- a/configure.json
+++ b/configure.json
@@ -200,7 +200,7 @@
@@ -201,7 +201,7 @@
{
"libs": "",
"builds": {
@ -25,5 +25,5 @@ index 9d8e93a227..80e15ce156 100644
},
"condition": "config.win32 && features.shared"
--
2.22.0
2.26.0

View File

@ -1,17 +1,17 @@
From c75a87b8378987e9a63235984021377755418ba1 Mon Sep 17 00:00:00 2001
From ca204fd0ed444fdf4e478540f8b5d88cb345be75 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 20:51:19 +0100
Subject: [PATCH 10/33] Fix linking against static freetype2
Subject: [PATCH 10/31] Fix linking against static freetype2
---
src/gui/configure.json | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 36325920cd..972f9914ea 100644
index 099c11da95..872deb3ad3 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -238,8 +238,11 @@
@@ -239,8 +239,11 @@
},
"headers": "ft2build.h",
"sources": [
@ -26,5 +26,5 @@ index 36325920cd..972f9914ea 100644
{ "libs": "-lfreetype" }
],
--
2.22.0
2.26.0

View File

@ -1,17 +1,17 @@
From 4f637a1ae1182f9327cc5fd198961e906cff59eb Mon Sep 17 00:00:00 2001
From 483ae9b6bfc1f40e3617d8b6cd58ef93985cf397 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:22:56 +0200
Subject: [PATCH 11/33] Fix linking against static harfbuzz
Subject: [PATCH 11/31] Fix linking against static harfbuzz
---
src/gui/configure.json | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 972f9914ea..894c10259d 100644
index 872deb3ad3..7daaaa5a11 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -306,7 +306,11 @@
@@ -307,7 +307,11 @@
},
"headers": "harfbuzz/hb.h",
"sources": [
@ -25,5 +25,5 @@ index 972f9914ea..894c10259d 100644
},
"imf": {
--
2.22.0
2.26.0

View File

@ -1,17 +1,17 @@
From 3fccf1f581659113ae325f5192c8d6870c894c84 Mon Sep 17 00:00:00 2001
From 0c26bfba6773298fd314fc38ec1be7cb58a5d752 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:24:01 +0200
Subject: [PATCH 12/33] Fix linking against static pcre
Subject: [PATCH 12/31] Fix linking against static pcre
Change-Id: I3225c6e82dc4d17aef37d4289c16eb7a5ea3c5a1
---
src/corelib/tools/qregularexpression.cpp | 4 ++++
src/corelib/text/qregularexpression.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp
index bdaa2d3243..90f8250c03 100644
--- a/src/corelib/tools/qregularexpression.cpp
+++ b/src/corelib/tools/qregularexpression.cpp
diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp
index 59d21e0a23..518f91d753 100644
--- a/src/corelib/text/qregularexpression.cpp
+++ b/src/corelib/text/qregularexpression.cpp
@@ -53,6 +53,10 @@
#include <QtCore/qdatastream.h>
@ -24,5 +24,5 @@ index bdaa2d3243..90f8250c03 100644
#include <pcre2.h>
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 7ea90aaf596477d79194673de9fb4b8076883186 Mon Sep 17 00:00:00 2001
From 2852ac7e9e087b8374daa044dba1885d5c2bbac5 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:56:55 +0200
Subject: [PATCH 13/33] Fix linking against shared/static MariaDB
Subject: [PATCH 13/31] Fix linking against shared/static MariaDB
Change-Id: I9722c154d845f288a2d4d1ab14a014066b28819b
---
@ -22,5 +22,5 @@ index cd20eef1df..babd0465ce 100644
{ "type": "mysqlConfig", "query": "--libs", "cleanlibs": true },
{ "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": false },
--
2.22.0
2.26.0

View File

@ -1,14 +1,14 @@
From e9076f7d190ce29321102ce695dbd105cccf14f7 Mon Sep 17 00:00:00 2001
From 5f3fb54d36009c5eced4335e79437b5d8eecdf08 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:58:25 +0200
Subject: [PATCH 14/33] Fix linking against shared/static PostgreSQL
Subject: [PATCH 14/31] Fix linking against shared/static PostgreSQL
---
src/plugins/sqldrivers/configure.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
index babd0465ce..b4b3bdec6b 100644
index babd0465ce..37e25881f0 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -88,9 +88,9 @@
@ -18,11 +18,11 @@ index babd0465ce..b4b3bdec6b 100644
- { "type": "pkgConfig", "args": "libpq" },
{ "type": "psqlConfig" },
- { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" },
+ { "type": "psqlEnv", "libs": "-lpq -lintl -lssl -lcrypto -lshell32 -lws2_32 -lsecur32 -liconv", "condition": "config.win32 && !features.shared" },
+ { "type": "psqlEnv", "libs": "-lpq -lpgcommon -lpgport -lintl -lssl -lcrypto -lshell32 -lws2_32 -lsecur32 -liconv", "condition": "config.win32 && !features.shared" },
+ { "type": "psqlEnv", "libs": "-lpq", "condition": "config.win32 && features.shared" },
{ "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" }
]
},
--
2.22.0
2.26.0

View File

@ -1,15 +1,15 @@
From 5eb2e0e33778a15ff05a2891e6752af573bca2e5 Mon Sep 17 00:00:00 2001
From d61af2077d70356fc0f69aeb27e82bed66f8d52e Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:25:40 +0200
Subject: [PATCH 15/33] Rename qtmain to qt5main
Subject: [PATCH 15/31] Rename qtmain to qt5main
Prevents conflict with mingw-w64-qt4 package
---
mkspecs/common/g++-win32.conf | 2 +-
mkspecs/features/create_cmake.prf | 4 ++--
mkspecs/features/create_cmake.prf | 8 ++++----
mkspecs/features/win32/windows.prf | 4 ++--
src/winmain/winmain.pro | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
index 5208d22bd6..1a058b787f 100644
@ -25,20 +25,28 @@ index 5208d22bd6..1a058b787f 100644
QMAKE_IDL = $${CROSS_COMPILE}widl
QMAKE_LIB = $${CROSS_COMPILE}ar -rc
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 2ab7775fea..6bc621ce27 100644
index 0e71fd0015..0e8d41c685 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -234,8 +234,8 @@ mac {
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
@@ -325,14 +325,14 @@ mac {
}
mingw {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}$${debug_suffix}.a
- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}.a
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a
+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
!isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_STATIC_WINDOWS_BUILD = "true"
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
} else {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}$${debug_suffix}.lib
- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt5main$${QT_LIBINFIX}$${debug_suffix}.lib
+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt5main$${QT_LIBINFIX}.lib
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
index 272170d428..17f3ef9c2d 100644
--- a/mkspecs/features/win32/windows.prf
@ -55,7 +63,7 @@ index 272170d428..17f3ef9c2d 100644
QMAKE_LIBS += $$lib
} else {
diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
index 9cb6ab0c59..4327ba365e 100644
index 1f54c846ec..162e7a4b1b 100644
--- a/src/winmain/winmain.pro
+++ b/src/winmain/winmain.pro
@@ -2,7 +2,7 @@
@ -68,5 +76,5 @@ index 9cb6ab0c59..4327ba365e 100644
CONFIG += static
--
2.22.0
2.26.0

View File

@ -1,41 +0,0 @@
From bfd5f5495a87d9a9d0bbf40e2bcc6b0108c34947 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:27:28 +0200
Subject: [PATCH 16/33] Build dynamic host libraries
This came initially from Fedora, not sure whether
it makes sense to keep it. Regular Arch package
uses static lib as intended by upstream.
Change-Id: I91a3613955c656fb0d262ccb9b2529350bab032b
---
mkspecs/features/qt_module.prf | 2 +-
src/tools/bootstrap-dbus/bootstrap-dbus.pro | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 51b5bde67a..70919e98e9 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -25,7 +25,7 @@ requires(!$$skip)
# Compile as shared/DLL or static according to the option given to configure
# unless overridden. Host builds are always static
-host_build|staticlib: CONFIG += static
+staticlib: CONFIG += static
host_build {
QT -= gui # no host module will ever use gui
diff --git a/src/tools/bootstrap-dbus/bootstrap-dbus.pro b/src/tools/bootstrap-dbus/bootstrap-dbus.pro
index c3ed27d979..30d2114aa1 100644
--- a/src/tools/bootstrap-dbus/bootstrap-dbus.pro
+++ b/src/tools/bootstrap-dbus/bootstrap-dbus.pro
@@ -27,4 +27,4 @@ SOURCES = \
load(qt_module)
lib.CONFIG = dummy_install
-INSTALLS = lib
+INSTALLS += lib
--
2.22.0

View File

@ -1,7 +1,7 @@
From ab07aa70bf16ce9858dbd3f4181b086c549b9304 Mon Sep 17 00:00:00 2001
From f24d3dd8face31fb7b522ca383b8515ba2913911 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 17:59:27 +0200
Subject: [PATCH 17/33] Enable rpath for build tools
Subject: [PATCH 16/31] Enable rpath for build tools
- Required because various tools depend on libQt5Bootstrap.so which resides
in folder /usr/${_arch}/lib
@ -33,5 +33,5 @@ index 8354f30eea..30e8cf18c5 100644
INSTALLS += target
--
2.22.0
2.26.0

View File

@ -1,17 +1,17 @@
From 312a89f94f25d46f925e0014e9e06eba43c37506 Mon Sep 17 00:00:00 2001
From 3b9033c42d77fba36734f8268f042e2c0154c2b5 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:04:42 +0200
Subject: [PATCH 18/33] Use system zlib for build tools
Subject: [PATCH 17/31] Use system zlib for build tools
---
src/tools/bootstrap/bootstrap.pro | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 83e44ff9a4..4734623936 100644
index 9863ff5e69..02329611bc 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -135,7 +135,9 @@ macx {
@@ -154,7 +154,9 @@ macx {
../../corelib/io/qstandardpaths_win.cpp
}
@ -23,5 +23,5 @@ index 83e44ff9a4..4734623936 100644
} else {
CONFIG += no_core_dep
--
2.22.0
2.26.0

View File

@ -1,22 +1,40 @@
From fbecb7397ba47d969cf5ecb263fc4c0c69ad7498 Mon Sep 17 00:00:00 2001
From 5756d20ee409d114a355bd07051311757af46fa4 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:45:08 +0200
Subject: [PATCH 20/33] Merge shared and static library trees
Subject: [PATCH 18/31] Merge shared and static library trees
Allow installation of shared and static build in the same prefix
Change-Id: I1de08df42d83d411aae519691cd3cde1fd6f3d1d
---
configure.pri | 9 +++++++++
mkspecs/features/default_post.prf | 11 +++++++++++
mkspecs/features/qt.prf | 17 +++++++++++++++++
mkspecs/features/spec_pre.prf | 11 ++++++++---
qmake/generators/makefile.cpp | 9 ++++++---
5 files changed, 51 insertions(+), 6 deletions(-)
configure.pri | 16 +++++++++++++++-
mkspecs/features/default_post.prf | 11 +++++++++++
mkspecs/features/device_config.prf | 9 ++++++++-
mkspecs/features/qt.prf | 17 +++++++++++++++++
mkspecs/features/spec_pre.prf | 11 ++++++++---
qmake/generators/makefile.cpp | 11 +++++++----
qtbase.pro | 10 ++++++++--
7 files changed, 74 insertions(+), 11 deletions(-)
diff --git a/configure.pri b/configure.pri
index 81133da3d7..8e703a0975 100644
index 81c84b28ef..910e59188f 100644
--- a/configure.pri
+++ b/configure.pri
@@ -1350,3 +1350,12 @@ defineTest(createConfigStatus) {
@@ -648,7 +648,12 @@ defineTest(qtConfOutput_machineTuple) {
defineTest(qtConfOutput_commitOptions) {
# qdevice.pri needs to be written early, because the compile tests require it.
- write_file($$QT_BUILD_TREE/mkspecs/qdevice.pri, $${currentConfig}.output.devicePro)|error()
+ shared|actually_a_shared_build {
+ DEVICE_PRI_SUFFIX = .pri
+ } else {
+ DEVICE_PRI_SUFFIX = .static.pri
+ }
+ write_file($$QT_BUILD_TREE/mkspecs/qdevice$$DEVICE_PRI_SUFFIX, $${currentConfig}.output.devicePro)|error()
}
# type (empty or 'host'), option name, default value
@@ -1387,3 +1392,12 @@ defineTest(createConfigStatus) {
QMAKE_POST_CONFIGURE += \
"createConfigStatus()"
@ -30,7 +48,7 @@ index 81133da3d7..8e703a0975 100644
+ CONFIG += no_smart_library_merge
+}
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index 9df99b8648..9c1dd6a735 100644
index 1d79f5c958..48f6e710b6 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -1,5 +1,16 @@
@ -50,11 +68,31 @@ index 9df99b8648..9c1dd6a735 100644
contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target
!have_target:!force_qt: CONFIG -= qt
diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf
index c15559e174..dd09ac749d 100644
--- a/mkspecs/features/device_config.prf
+++ b/mkspecs/features/device_config.prf
@@ -4,7 +4,14 @@
# supposed to be influenced by -device-option then.
host_build: return()
-DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
+shared|actually_a_shared_build {
+ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
+} else {
+ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.static.pri
+ !exists($$DEVICE_PRI) {
+ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
+ }
+}
exists($$DEVICE_PRI):include($$DEVICE_PRI)
unset(DEVICE_PRI)
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index d9a306772c..893abfcca6 100644
index 3a71376029..bbada46c29 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -235,6 +235,23 @@ for(ever) {
@@ -232,6 +232,23 @@ for(ever) {
!isEmpty(MODULE_WINRT_CAPABILITIES_DEVICE): \
WINRT_MANIFEST.capabilities_device_default += $$MODULE_WINRT_CAPABILITIES_DEVICE
}
@ -101,10 +139,10 @@ index 51ea3a8321..275e080ae4 100644
QMAKE_EXT_YACC = .y
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index fedbaaf601..fd3b5c405a 100644
index 9c65f21ac0..f79512ca60 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -3247,6 +3247,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
@@ -3232,6 +3232,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
if (project->isActiveConfig("debug")) {
ret += "d";
}
@ -114,19 +152,57 @@ index fedbaaf601..fd3b5c405a 100644
ret += Option::pkgcfg_ext;
QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
if(!subdir.isEmpty()) {
@@ -3421,9 +3424,9 @@ MakefileGenerator::writePkgConfigFile()
t << endl;
@@ -3408,11 +3411,11 @@ MakefileGenerator::writePkgConfigFile()
t << Qt::endl;
// requires
- const QString requires = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' ');
- if (!requires.isEmpty()) {
- t << "Requires: " << requires << endl;
- const QString requiresString = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' ');
- if (!requiresString.isEmpty()) {
- t << "Requires: " << requiresString << Qt::endl;
+ t << "Requires:";
+ for (const auto &required : project->values("QMAKE_PKGCONFIG_REQUIRES")) {
+ const auto pkgconfigRequires = project->values("QMAKE_PKGCONFIG_REQUIRES");
+ for (const auto &required : pkgconfigRequires) {
+ t << (project->isActiveConfig("staticlib") ? QStringLiteral(" Static") : QStringLiteral(" ")) << required.toQString();
}
-
t << Qt::endl;
}
t << endl;
diff --git a/qtbase.pro b/qtbase.pro
index c0ce0972ef..5a2deaf31d 100644
--- a/qtbase.pro
+++ b/qtbase.pro
@@ -20,6 +20,12 @@ CLEAN_DEPS += qmake-clean
# recursive distclean proceeds, including beyond qtbase.
DISTCLEAN_DEPS += qmake-clean
+shared|actually_a_shared_build {
+ DEVICE_PRI_SUFFIX = .pri
+} else {
+ DEVICE_PRI_SUFFIX = .static.pri
+}
+
# Files created by configure.
# config.status (and configure.cache, which is the same for Windows)
# are omitted for convenience of rebuilds.
@@ -27,7 +33,7 @@ QMAKE_DISTCLEAN += \
config.summary \
config.tests/.qmake.cache \
mkspecs/qconfig.pri \
- mkspecs/qdevice.pri \
+ mkspecs/qdevice$$DEVICE_PRI_SUFFIX \
mkspecs/qmodule.pri \
src/corelib/global/qconfig.h \
src/corelib/global/qconfig_p.h \
@@ -78,7 +84,7 @@ prefix_build|!equals(PWD, $$OUT_PWD) {
mkspecs.path = $$[QT_HOST_DATA]/mkspecs
mkspecs.files = \
$$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri \
- $$OUT_PWD/mkspecs/qdevice.pri \
+ $$OUT_PWD/mkspecs/qdevice$$DEVICE_PRI_SUFFIX \
$$files($$PWD/mkspecs/*)
mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst
INSTALLS += mkspecs
--
2.22.0
2.26.0

View File

@ -1,37 +1,39 @@
From 0d4a731b11334260c28484e58b135dba1f716204 Mon Sep 17 00:00:00 2001
From e21df21893a3071ea5908c9cc19becda0287a231 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:26:18 +0200
Subject: [PATCH 19/33] Use *.dll.a as import lib extension
Subject: [PATCH 19/31] Use *.dll.a as import lib extension
The variables used here are provided by
g++-win32.conf
Change-Id: I40acb56685628ed52b3e6b89aab7f53f9a872b1a
---
mkspecs/features/create_cmake.prf | 5 +++--
mkspecs/features/qt.prf | 5 ++++-
mkspecs/features/qt.prf | 15 ++++++++++++---
qmake/generators/win32/winmakefile.cpp | 15 +++++++++++----
3 files changed, 18 insertions(+), 7 deletions(-)
3 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 6bc621ce27..226dc93c4d 100644
index 0e8d41c685..a94f443de6 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -245,8 +245,9 @@ mac {
CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
} else {
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
+ isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.$${QMAKE_EXTENSION_IMPORTLIB}
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
}
@@ -328,8 +328,9 @@ mac {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
+ isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.$${QMAKE_EXTENSION_IMPORTLIB}
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
} else {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt5main$${QT_LIBINFIX}$${debug_suffix}.lib
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt5main$${QT_LIBINFIX}.lib
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 3a71376029..d9a306772c 100644
index bbada46c29..d6299d8eed 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -213,9 +213,12 @@ for(ever) {
@@ -213,12 +213,21 @@ for(ever) {
LIBS$$var_sfx += -framework $$framework
} else {
lib = $$MODULE_MODULE$$qtPlatformTargetSuffix()
@ -39,17 +41,28 @@ index 3a71376029..d9a306772c 100644
+ contains(MODULE_CONFIG, staticlib) {
lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_STATICLIB
PRE_TARGETDEPS += $$lib
+ } else:win32 {
+ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_IMPORTLIB
+ PRE_TARGETDEPS += $$lib
} else {
lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB
}
- lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB
- }
+ win32 {
+ shared|actually_a_shared_build {
+ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_IMPORTLIB
+ } else {
+ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_STATICLIB
+ }
+ PRE_TARGETDEPS += $$lib
+ } else {
+ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB
+ }
+ }
LIBS$$var_sfx += $$lib
}
}
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index d9887cd36d..4f1a4344df 100644
index f33edb5bd9..3a75986257 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -80,9 +80,13 @@ Win32MakefileGenerator::parseLibFlag(const ProString &flag, ProString *arg)
@@ -99,9 +99,13 @@ private:
bool
Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
{
@ -63,10 +76,10 @@ index d9887cd36d..4f1a4344df 100644
+ impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB"));
+ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
+ }
QList<QMakeLocalFileName> dirs;
QVector<LibrarySearchPath> dirs;
int libidx = 0;
for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
@@ -257,9 +261,12 @@ void Win32MakefileGenerator::fixTargetExt()
@@ -283,9 +287,12 @@ void Win32MakefileGenerator::fixTargetExt()
if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
project->values("TARGET_EXT").append(".exe");
} else if (project->isActiveConfig("shared")) {
@ -81,5 +94,5 @@ index d9887cd36d..4f1a4344df 100644
+ project->first("QMAKE_EXTENSION_SHLIB"));
project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET");
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From c6d6cd1bc226fc2ad4738f641721de75052c4328 Mon Sep 17 00:00:00 2001
From 181461364ddf790c194108c4d6130cdd117c3a0a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:32:00 +0200
Subject: [PATCH 21/33] Pull dependencies of static libraries in CMake modules
Subject: [PATCH 20/31] Pull dependencies of static libraries in CMake modules
When doing a static build of Qt, the dependencies of the Qt
libraries and plugins itself must be specified when linking
@ -20,13 +20,21 @@ e.g. to use QMAKE_PRL_LIBS instead of QMAKE_PRL_LIBS_FOR_CMAKE.
See https://github.com/Martchus/PKGBUILDs/issues/86#issuecomment-476840055
for further details on 2.
With Qt 5.14.0 the support for using static libraries seems
to be further improved. I had not time to test whether it
actually works so I keep using my own implemention for now.
That's why this patch now removes a lot of the 5.14.0 additions
in favour of 'how it used to work'.
Change-Id: I6566d42d7e27d4cd23d261a0eacca9efad9ce6df
---
.../data/cmake/Qt5BasicConfig.cmake.in | 168 +++++++++++++-----
.../data/cmake/Qt5PluginTarget.cmake.in | 11 +-
2 files changed, 135 insertions(+), 44 deletions(-)
.../data/cmake/Qt5BasicConfig.cmake.in | 241 ++++++++++--------
.../data/cmake/Qt5PluginTarget.cmake.in | 84 +-----
2 files changed, 135 insertions(+), 190 deletions(-)
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 705e0a3c93..eb7fce9645 100644
index 1099a761ce..a82e6a886f 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -53,6 +53,10 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
@ -37,19 +45,30 @@ index 705e0a3c93..eb7fce9645 100644
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .a .lib)
+ set(CMAKE_FIND_LIBRARY_PREFIXES lib \"\")
+
get_filename_component(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" ABSOLUTE)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
!!ELSE
@@ -61,6 +65,10 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
if(EXISTS \"${prl_file_location}\")
@@ -68,7 +72,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
# Handle normal libraries passed as -lfoo
set(_lib \"${CMAKE_MATCH_1}\")
foreach(_standard_library ${_standard_libraries})
- if(_standard_library MATCHES \"^${_lib}(\\.lib)?$\")
+ if(_standard_library MATCHES \"^${_lib}(\\.lib||\\.a)?$\")
set(_lib_is_default_linked TRUE)
break()
endif()
@@ -109,11 +113,42 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=\")
+ if(NOT _prl_strings)
+ message(WARNING \"Prl file for Qt 5 module $${CMAKE_MODULE_NAME} does not contain QMAKE_PRL_LIBS_FOR_CMAKE. Was looking at \\\"${prl_file_location}\\\".\")
+ return()
+ endif()
# file(STRINGS) replaces all semicolons read from the file with backslash semicolons.
# We need to do a reverse transformation in CMake. For that we replace all backslash
@@ -92,7 +100,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
# Handle normal libraries passed as -lfoo
set(_lib \"${CMAKE_MATCH_1}\")
foreach(_standard_library ${_standard_libraries})
- if(_standard_library MATCHES \"^${_lib}(\\\\.lib)?$\")
+ if(_standard_library MATCHES \"^${_lib}(\\\\.lib|\\\\.a)?$\")
set(_lib_is_default_linked TRUE)
break()
endif()
@@ -139,6 +147,37 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
set(${lib_deps} ${_lib_deps} PARENT_SCOPE)
set(${link_flags} \"SHELL:${_link_flags}\" PARENT_SCOPE)
endfunction()
@ -87,71 +106,87 @@ index 705e0a3c93..eb7fce9645 100644
!!ENDIF
!!IF !equals(TEMPLATE, aux)
-macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_CONFIG LIB_LOCATION IMPLIB_LOCATION)
+ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${TARGET_CONFIG})
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
@@ -121,44 +156,62 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
@@ -152,61 +191,39 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
!!ENDIF
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+
set(_deps
${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}
- )
- set(_static_deps
!!IF !isEmpty(CMAKE_STATIC_TYPE)
- ${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}
+ ${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${TARGET_CONFIG}_LIB_DEPENDENCIES}
${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}
!!ENDIF
)
+ # FIXME: handle IsDebugAndRelease like in official version
+
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"INTERFACE_LINK_LIBRARIES\" \"${_deps}\"
- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
+ \"IMPORTED_LOCATION_${TARGET_CONFIG}\" ${imported_location}
\"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
!!IF !isEmpty(CMAKE_LIB_SONAME)
- \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
+ \"IMPORTED_SONAME_${TARGET_CONFIG}\" \"$${CMAKE_LIB_SONAME}\"
\"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
!!ENDIF
- # For backward compatibility with CMake < 2.8.12
- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps}\"
- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps};${_static_deps}\"
)
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_deps}\"
- )
-
+ _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME} \"${TARGET_CONFIG}\" \"${_deps}\")
if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
\"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\"
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
- if(NOT "${IsDebugAndRelease}")
- set(_genex_condition \"1\")
- else()
- if("${Configuration}" STREQUAL "DEBUG")
- set(_genex_condition \"$<CONFIG:Debug>\")
- else()
- set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
- endif()
- endif()
-
- if(_static_deps)
- set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\")
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_static_deps_genex}\"
+ _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME} \"${Configuration}\" \"${_deps}\")
+ if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
+ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ \"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\"
)
endif()
-
- set(_static_link_flags \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\")
- if(_static_link_flags)
- set(_static_link_flags_genex \"$<${_genex_condition}:${_static_link_flags}>\")
- if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_OPTIONS
- \"${_static_link_flags_genex}\"
- )
- else()
- # Abuse INTERFACE_LINK_LIBRARIES to add link flags when CMake version is too low.
- # Strip out SHELL:, because it is not supported in this property. And hope for the best.
- string(REPLACE \"SHELL:\" \"\" _static_link_flags_genex \"${_static_link_flags_genex}\")
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_static_link_flags_genex}\"
- )
- endif()
- endif()
+!!ELSE
+ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ \"INTERFACE_LINK_LIBRARIES_${TARGET_CONFIG}\" \"${_deps}\"
+ \"IMPORTED_LOCATION_${TARGET_CONFIG}\" ${imported_location}
+ \"INTERFACE_LINK_LIBRARIES_${Configuration}\" \"${_deps}\"
+ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
+!!IF !isEmpty(CMAKE_LIB_SONAME)
+ \"IMPORTED_SONAME_${TARGET_CONFIG}\" \"$${CMAKE_LIB_SONAME}\"
+ \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
+!!ENDIF
+ # For backward compatibility with CMake < 2.8.12
+ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${TARGET_CONFIG}\" \"${_deps}\"
+ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps}\"
+ )
!!ENDIF
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ELSE
- set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ set(imported_implib \"IMPORTED_IMPLIB_${TARGET_CONFIG}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
+ \"IMPORTED_IMPLIB_${TARGET_CONFIG}\" ${imported_implib}
)
@@ -223,6 +240,15 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
endif()
!!ENDIF
endmacro()
@ -167,7 +202,7 @@ index 705e0a3c93..eb7fce9645 100644
!!ENDIF
if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -328,13 +381,15 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -408,13 +434,15 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
@ -185,9 +220,9 @@ index 705e0a3c93..eb7fce9645 100644
!!IF !equals(TEMPLATE, aux)
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
@@ -349,6 +404,56 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_ENABLED_FEATURES $$join(QT.$${MODULE}.enabled_features, ";"))
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_DISABLED_FEATURES $$join(QT.$${MODULE}.disabled_features, ";"))
@@ -431,6 +459,56 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\")
+ # Find plugin targets
+ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/*Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
@ -242,7 +277,7 @@ index 705e0a3c93..eb7fce9645 100644
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE)
foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR})
@@ -367,9 +472,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -449,9 +527,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
list(APPEND _Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS ${dep}Private)
endif()
endforeach()
@ -256,13 +291,13 @@ index 705e0a3c93..eb7fce9645 100644
endif()
!!IF !equals(TEMPLATE, aux)
@@ -439,9 +548,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -521,9 +603,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ELSE
\"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
!!ENDIF
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
endif()
+!!ENDIF // CMAKE_STATIC_TYPE
+
@ -270,13 +305,16 @@ index 705e0a3c93..eb7fce9645 100644
!!ENDIF // CMAKE_RELEASE_TYPE
!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
@@ -452,29 +563,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -534,73 +618,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
)
!!ENDIF // TEMPLATE != aux
-!!IF isEmpty(CMAKE_INTERNAL_MODULE)
-
- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
-
- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION
- IsDebugAndRelease)
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
-
-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
@ -288,6 +326,45 @@ index 705e0a3c93..eb7fce9645 100644
- set_target_properties(Qt5::${Plugin} PROPERTIES
- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
- )
-
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
- set(_static_deps
- ${_Qt5${Plugin}_STATIC_${Configuration}_LIB_DEPENDENCIES}
- )
-
- if(NOT "${IsDebugAndRelease}")
- set(_genex_condition \"1\")
- else()
- if("${Configuration}" STREQUAL "DEBUG")
- set(_genex_condition \"$<CONFIG:Debug>\")
- else()
- set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
- endif()
- endif()
- if(_static_deps)
- set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\")
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_static_deps_genex}\"
- )
- endif()
-
- set(_static_link_flags \"${_Qt5${Plugin}_STATIC_${Configuration}_LINK_FLAGS}\")
- if(_static_link_flags)
- set(_static_link_flags_genex \"$<${_genex_condition}:${_static_link_flags}>\")
- if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_OPTIONS
- \"${_static_link_flags_genex}\"
- )
- else()
- # Abuse INTERFACE_LINK_LIBRARIES to add link flags when CMake version is too low.
- # Strip out SHELL:, because it is not supported in this property. And hope for the best.
- string(REPLACE \"SHELL:\" \"\" _static_link_flags_genex \"${_static_link_flags_genex}\")
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_static_link_flags_genex}\"
- )
- endif()
- endif()
-!!ENDIF
- endmacro()
-
- if (pluginTargets)
@ -296,33 +373,116 @@ index 705e0a3c93..eb7fce9645 100644
- endforeach()
- endif()
-
-!!ENDIF // isEmpty(CMAKE_INTERNAL_MODULE)
-
-
!!IF !isEmpty(CMAKE_MODULE_EXTRAS)
include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
!!ENDIF
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
index 5baf0fdb10..ec5f3cc437 100644
index 7b70cfed09..25f2162fe6 100644
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
@@ -1,11 +1,14 @@
@@ -1,5 +1,6 @@
-
-add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
+# Some Qt modules also load plugin target in extra config, so check whether the target already exists
+if(NOT TARGET Qt5::$$CMAKE_PLUGIN_NAME)
+ add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
!!IF !isEmpty(CMAKE_STATIC_TYPE)
set(_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_PLUGIN_MODULE_DEPS}\")
@@ -16,87 +17,14 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
endforeach()
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS
-)
-!!ELSE
-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS
-)
-!!ENDIF
-!!ENDIF
-
-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS
-)
-!!ELSE
-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS
-)
-!!ENDIF
+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
!!ENDIF
-
-set_property(TARGET Qt5::$$CMAKE_PLUGIN_NAME PROPERTY INTERFACE_SOURCES
- \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_$${CMAKE_PLUGIN_NAME}_Import.cpp\"
-)
!!ENDIF
-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
!!ENDIF
list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
-set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY QT_ALL_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED} Qt5::$${CMAKE_PLUGIN_NAME})
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
-# $<GENEX_EVAL:...> wasn\'t added until CMake 3.12, so put a version guard around it
-if(CMAKE_VERSION VERSION_LESS \"3.12\")
- set(_manual_plugins_genex \"$<TARGET_PROPERTY:QT_PLUGINS>\")
- set(_plugin_type_genex \"$<TARGET_PROPERTY:QT_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED}>\")
- set(_no_plugins_genex \"$<TARGET_PROPERTY:QT_NO_PLUGINS>\")
-else()
- set(_manual_plugins_genex \"$<GENEX_EVAL:$<TARGET_PROPERTY:QT_PLUGINS>>\")
- set(_plugin_type_genex \"$<GENEX_EVAL:$<TARGET_PROPERTY:QT_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED}>>\")
- set(_no_plugins_genex \"$<GENEX_EVAL:$<TARGET_PROPERTY:QT_NO_PLUGINS>>\")
+
+endif()
endif()
-set(_user_specified_genex
- \"$<IN_LIST:Qt5::$$CMAKE_PLUGIN_NAME,${_manual_plugins_genex};${_plugin_type_genex}>\"
-)
-string(CONCAT _plugin_genex
- \"$<$<OR:\"
- # Add this plugin if it\'s in the list of manual plugins or plugins for the type
- \"${_user_specified_genex},\"
- # Add this plugin if the list of plugins for the type is empty, the PLUGIN_EXTENDS
- # is either empty or equal to the module name, and the user hasn\'t blacklisted it
- \"$<AND:\"
- \"$<STREQUAL:${_plugin_type_genex},>,\"
- \"$<OR:\"
- \"$<STREQUAL:$<TARGET_PROPERTY:Qt5::$${CMAKE_PLUGIN_NAME},QT_PLUGIN_EXTENDS>,Qt5::$${CMAKE_MODULE_NAME}>,\"
- \"$<STREQUAL:$<TARGET_PROPERTY:Qt5::$${CMAKE_PLUGIN_NAME},QT_PLUGIN_EXTENDS>,>\"
- \">,\"
- \"$<NOT:$<IN_LIST:Qt5::$${CMAKE_PLUGIN_NAME},${_no_plugins_genex}>>\"
- \">\"
- \">:Qt5::$$CMAKE_PLUGIN_NAME>\"
-)
-set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- ${_plugin_genex}
-)
-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"$${CMAKE_PLUGIN_QT5_MODULE_DEPS}\"
-)
-!!ENDIF
-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_TYPE \"$$CMAKE_PLUGIN_TYPE\")
-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_EXTENDS \"$$CMAKE_PLUGIN_EXTENDS\")
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 84642f26d1c905c426f206a6edbe5ac31e6fb227 Mon Sep 17 00:00:00 2001
From f92560dca3a5ade9c23dc6f5cf84ec0ab6404080 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sat, 5 Aug 2017 21:14:26 +0200
Subject: [PATCH 22/33] Allow usage of static version with CMake
Subject: [PATCH 21/31] Allow usage of static version with CMake
Allow selecting between dynamic and static Qt versions
installed in the same prefix
@ -10,22 +10,24 @@ installed in the same prefix
- Static targets are prefixed, eg. StaticQt5::Core
- Set USE_STATIC_QT_BY_DEFAULT to use static version
via regular find_package(Qt5Core)
Change-Id: I339c8ef3a6ab96a3a6b85f7c8b93f1a5ee38cd71
---
mkspecs/features/create_cmake.prf | 103 ++++---
.../data/cmake/Qt5BasicConfig.cmake.in | 285 ++++++++++++------
.../data/cmake/Qt5PluginTarget.cmake.in | 18 +-
mkspecs/features/create_cmake.prf | 96 ++++--
.../data/cmake/Qt5BasicConfig.cmake.in | 304 ++++++++++++------
.../data/cmake/Qt5PluginTarget.cmake.in | 22 +-
.../cmake/Qt5StaticOnlyRedirection.cmake.in | 11 +
src/corelib/Qt5CoreConfigExtras.cmake.in | 24 +-
src/gui/Qt5GuiConfigExtras.cmake.in | 8 +-
src/testlib/Qt5TestConfigExtras.cmake.in | 2 +-
7 files changed, 303 insertions(+), 148 deletions(-)
7 files changed, 320 insertions(+), 147 deletions(-)
create mode 100644 mkspecs/features/data/cmake/Qt5StaticOnlyRedirection.cmake.in
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 226dc93c4d..0e9afa4eaf 100644
index a94f443de6..a0166e4230 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -51,7 +51,7 @@ split_incpath {
@@ -68,7 +68,7 @@ split_incpath {
$$QT_MODULE_INCLUDE_BASE/$${CMAKE_INCLUDE_NAME}/$$eval(QT.$${MODULE}.VERSION)/$${CMAKE_INCLUDE_NAME})
cmake_extra_source_includes.input = $$PWD/data/cmake/ExtraSourceIncludes.cmake.in
@ -34,56 +36,70 @@ index 226dc93c4d..0e9afa4eaf 100644
!build_pass:QMAKE_SUBSTITUTES += \
cmake_extra_source_includes
@@ -101,6 +101,8 @@ win32:!static:!staticlib {
@@ -118,6 +118,8 @@ win32:!static:!staticlib {
}
static|staticlib:CMAKE_STATIC_TYPE = true
+static|staticlib:DEFAULT_QT_VARIANT_PREFIX = "Static"
+else:DEFAULT_QT_VARIANT_PREFIX = ""
CMAKE_DEBUG_TYPE =
CMAKE_RELEASE_TYPE =
@@ -146,17 +148,19 @@ contains(CONFIG, plugin) {
CMAKE_PLUGIN_NAME = $$PLUGIN_CLASS_NAME
internal_module {
CMAKE_INTERNAL_MODULE = true
@@ -214,20 +216,25 @@ contains(CONFIG, plugin) {
win32 {
!mingw|qtConfig(debug_and_release): debug_suffix="d"
- CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
- CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl
-
- isEmpty(CMAKE_STATIC_TYPE) {
+ mingw {
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.dll
- } else:mingw {
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.a
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}d.a
+ CMAKE_PLUGIN_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/lib$${TARGET}.a
+ CMAKE_PLUGIN_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/lib$${TARGET}d.a
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${debug_suffix}.a
+ CMAKE_PLUGIN_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a
+ CMAKE_PLUGIN_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${debug_suffix}.a
+ CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.static.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.static.prl
} else { # MSVC static
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.lib
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.lib
+ CMAKE_PLUGIN_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/$${TARGET}.lib
+ CMAKE_PLUGIN_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/$${TARGET}d.lib
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.lib
+ CMAKE_PLUGIN_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib
+ CMAKE_PLUGIN_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.lib
+ CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl
}
} else {
+ # this branch is broken by the patch, only apply when building for Windows
mac {
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dylib
else: CMAKE_PlUGIN_EXT = .a
@@ -172,13 +176,13 @@ contains(CONFIG, plugin) {
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PLUGIN_EXT = .dylib
else: CMAKE_PLUGIN_EXT = .a
@@ -247,9 +254,9 @@ contains(CONFIG, plugin) {
}
}
cmake_target_file.input = $$PWD/data/cmake/Qt5PluginTarget.cmake.in
- cmake_target_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}.cmake
+ cmake_target_file.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}.cmake
cmake_qt5_plugin_import_file.input = $$PWD/data/cmake/Qt5ImportPlugin.cpp.in
- cmake_qt5_plugin_import_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}_Import.cpp
+ cmake_qt5_plugin_import_file.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}_Import.cpp
!build_pass:QMAKE_SUBSTITUTES += \
cmake_target_file
!build_pass {
QMAKE_SUBSTITUTES += cmake_target_file
@@ -258,7 +265,7 @@ contains(CONFIG, plugin) {
cmake_qt5_plugin_file.files = $$cmake_target_file.output
static|staticlib: cmake_qt5_plugin_file.files += $$cmake_qt5_plugin_import_file.output
- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
+ cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}
INSTALLS += cmake_qt5_plugin_file
return()
@@ -191,25 +195,34 @@ mod_deps =
@@ -271,26 +278,34 @@ mod_deps =
lib_deps =
aux_mod_deps =
aux_lib_deps =
@ -113,63 +129,53 @@ index 226dc93c4d..0e9afa4eaf 100644
+CMAKE_QT5_MODULE_DEPS_STATIC = $$join(lib_deps_static, ";")
CMAKE_INTERFACE_MODULE_DEPS = $$join(aux_mod_deps, ";")
CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";")
CMAKE_MODULE_PLUGIN_TYPES = $$join(QT.$${MODULE}.plugin_types, ";")
+CMAKE_INTERFACE_QT5_MODULE_DEPS_STATIC = $$join(aux_lib_deps_static, ";")
+CMAKE_INTERFACE_COMPILE_DEFINITIONS_STATIC = $$join(aux_compile_defs_static, ";")
+
mac {
+ # this branch is broken by the patch, only apply when building for Windows
!isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
@@ -237,35 +250,33 @@ mac {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}.a
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
@@ -317,13 +332,6 @@ mac {
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.dll
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
- !isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_STATIC_WINDOWS_BUILD = "true"
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
+ isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = dll.a
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.$${QMAKE_EXTENSION_IMPORTLIB}
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl
- !isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_STATIC_WINDOWS_BUILD = "true"
-
- CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl
- CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
- }
-
mingw {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
@@ -331,14 +339,30 @@ mac {
isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.$${QMAKE_EXTENSION_IMPORTLIB}
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
+
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC = lib$${CMAKE_QT_STEM}d.a
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC = lib$${CMAKE_QT_STEM}$${debug_suffix}.a
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC = lib$${CMAKE_QT_STEM}.a
+ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}d.static.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}$${debug_suffix}.static.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC = $${CMAKE_QT_STEM}.static.prl
- CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl
- CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
- } else {
- isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.$${QMAKE_EXTENSION_IMPORTLIB}
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
- }
+
} else {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt5main$${QT_LIBINFIX}$${debug_suffix}.lib
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt5main$${QT_LIBINFIX}.lib
- !isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_STATIC_WINDOWS_BUILD = "true"
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
- CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl
- CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
- } else {
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
- }
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}d.lib
+
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}$${debug_suffix}.lib
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC = $${CMAKE_QT_STEM}.lib
+ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}d.static.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}$${debug_suffix}.static.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC = $${CMAKE_QT_STEM}.static.prl
}
} else {
@ -177,7 +183,7 @@ index 226dc93c4d..0e9afa4eaf 100644
!isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
@@ -285,12 +296,12 @@ mac {
@@ -358,12 +382,12 @@ mac {
INSTALLS += cmake_qt5_module_files
cmake_config_file.input = $$PWD/data/cmake/Qt5BasicConfig.cmake.in
@ -192,7 +198,7 @@ index 226dc93c4d..0e9afa4eaf 100644
!build_pass:QMAKE_SUBSTITUTES += \
cmake_config_file \
@@ -300,11 +311,29 @@ cmake_qt5_module_files.files = \
@@ -373,11 +397,29 @@ cmake_qt5_module_files.files = \
$$cmake_config_file.output \
$$cmake_config_version_file.output
@ -223,7 +229,7 @@ index 226dc93c4d..0e9afa4eaf 100644
!build_pass:QMAKE_SUBSTITUTES += cmake_extras_file
@@ -316,7 +345,7 @@ cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
@@ -389,7 +431,7 @@ cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
exists($$cmake_macros_file.input) {
CMAKE_MODULE_MACROS = "true"
@ -232,7 +238,7 @@ index 226dc93c4d..0e9afa4eaf 100644
cmake_macros_file.CONFIG = verbatim
!build_pass:QMAKE_SUBSTITUTES += cmake_macros_file
@@ -324,7 +353,7 @@ exists($$cmake_macros_file.input) {
@@ -397,7 +439,7 @@ exists($$cmake_macros_file.input) {
cmake_qt5_module_files.files += $$cmake_macros_file.output
}
@ -242,7 +248,7 @@ index 226dc93c4d..0e9afa4eaf 100644
# We are generating cmake files. Most developers of Qt are not aware of cmake,
# so we require automatic tests to be available. The only module which should
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index eb7fce9645..e89cd26756 100644
index a82e6a886f..270d5c1c75 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -3,6 +3,33 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0)
@ -305,7 +311,7 @@ index eb7fce9645..e89cd26756 100644
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
@@ -144,18 +175,48 @@ if(NOT COMMAND _qt5_add_dependencies)
@@ -178,19 +209,50 @@ if(NOT COMMAND _qt5_add_dependencies)
endif()
endfunction()
endif()
@ -319,14 +325,16 @@ index eb7fce9645..e89cd26756 100644
!!ENDIF
!!IF !equals(TEMPLATE, aux)
-macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_CONFIG LIB_LOCATION IMPLIB_LOCATION)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${TARGET_CONFIG})
-macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties_static TARGET_NAME TARGET_CONFIG LIB_LOCATION IMPLIB_LOCATION)
+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties_static TARGET_NAME Configuration LIB_LOCATION IMPLIB_LOCATION
IsDebugAndRelease)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+!!ELSE
+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_NAME TARGET_CONFIG LIB_LOCATION IMPLIB_LOCATION)
+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_NAME Configuration LIB_LOCATION IMPLIB_LOCATION
+ IsDebugAndRelease)
+!!ENDIF
+ set_property(TARGET ${TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${TARGET_CONFIG})
+ set_property(TARGET ${TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+
@ -356,28 +364,28 @@ index eb7fce9645..e89cd26756 100644
set(_deps
${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}
@@ -165,15 +226,15 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_CONFIG LIB_LOCATI
)
@@ -202,15 +264,15 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
# FIXME: handle IsDebugAndRelease like in official version
!!IF !isEmpty(CMAKE_STATIC_TYPE)
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ set_target_properties(\"${TARGET_NAME}\" PROPERTIES
\"IMPORTED_LOCATION_${TARGET_CONFIG}\" ${imported_location}
\"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
!!IF !isEmpty(CMAKE_LIB_SONAME)
\"IMPORTED_SONAME_${TARGET_CONFIG}\" \"$${CMAKE_LIB_SONAME}\"
\"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
!!ENDIF
)
- _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME} \"${TARGET_CONFIG}\" \"${_deps}\")
+ _qt5_add_dependencies(\"${TARGET_NAME}\" \"${TARGET_CONFIG}\" \"${_deps}\")
- _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME} \"${Configuration}\" \"${_deps}\")
+ _qt5_add_dependencies(\"${TARGET_NAME}\" \"${Configuration}\" \"${_deps}\")
if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ set_target_properties(\"${TARGET_NAME}\" PROPERTIES
\"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\"
)
endif()
@@ -195,9 +256,13 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_CONFIG LIB_LOCATI
@@ -232,9 +294,13 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
!!ELSE
set(imported_implib \"IMPORTED_IMPLIB_${TARGET_CONFIG}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(${imported_implib})
@ -387,21 +395,20 @@ index eb7fce9645..e89cd26756 100644
if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ set_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
\"IMPORTED_IMPLIB_${TARGET_CONFIG}\" ${imported_implib}
\"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
)
endif()
@@ -214,8 +279,9 @@ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_target_dependencies_from_prl_file P
@@ -251,8 +317,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_target_dependencies_from_prl_file P
endmacro()
!!ENDIF
-if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+set(TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
+if(NOT TARGET ${TARGET_NAME})
-
+if(NOT TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
!!IF !no_module_headers
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
@@ -223,46 +289,50 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -260,46 +325,50 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
)
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
@ -466,7 +473,7 @@ index eb7fce9645..e89cd26756 100644
endforeach()
!!IF isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
@@ -271,16 +341,20 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -308,16 +377,20 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
list(FIND Qt5$${CMAKE_MODULE_NAME}_FIND_COMPONENTS Private _check_private)
if (NOT _check_private STREQUAL -1)
foreach(_dir ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
@ -490,7 +497,7 @@ index eb7fce9645..e89cd26756 100644
!!ENDIF // TEMPLATE != aux
set(_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_MODULE_DEPS}\")
@@ -288,10 +362,10 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -325,10 +398,10 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
list(APPEND _Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_INTERFACE_MODULE_DEPS}\")
!!ENDIF
@ -503,7 +510,7 @@ index eb7fce9645..e89cd26756 100644
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED REQUIRED)
endif()
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_QUIET)
@@ -299,17 +373,17 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -336,17 +409,17 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
set(_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET QUIET)
endif()
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT)
@ -525,7 +532,7 @@ index eb7fce9645..e89cd26756 100644
$$VERSION ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT}
${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET}
${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED}
@@ -317,28 +391,32 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -354,25 +427,25 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
)
endif()
@ -562,6 +569,17 @@ index eb7fce9645..e89cd26756 100644
+ list(REMOVE_DUPLICATES ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
!!ENDIF // TEMPLATE != aux
# It can happen that the same FooConfig.cmake file is included when calling find_package()
@@ -387,11 +460,16 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
#
# Make sure to return early in the original Config inclusion, because the target has already
# been defined as part of the second inclusion.
- if(TARGET Qt5::$${CMAKE_MODULE_NAME})
+ set(TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
+ if(TARGET ${TARGET_NAME})
return()
endif()
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ set(_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_QT5_MODULE_DEPS_STATIC}\")
+!!ELSE
@ -570,12 +588,46 @@ index eb7fce9645..e89cd26756 100644
!!IF !isEmpty(CMAKE_INTERFACE_QT5_MODULE_DEPS)
list(APPEND _Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_INTERFACE_QT5_MODULE_DEPS}\")
@@ -379,30 +457,41 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -402,13 +480,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC}\" DEBUG
_Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
_Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
)
!!ELSE
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
+ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC}\" DEBUG
_Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
_Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
)
@@ -418,13 +496,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC}\" RELEASE
_Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
_Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
)
!!ELSE
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
+ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC}\" RELEASE
_Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
_Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
)
@@ -432,32 +510,45 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ENDIF
endif()
- add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
+!!ENDIF
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ add_library(${TARGET_NAME} STATIC IMPORTED)
+ set_property(TARGET ${TARGET_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
@ -592,17 +644,17 @@ index eb7fce9645..e89cd26756 100644
!!IF !equals(TEMPLATE, aux)
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
+ set_property(TARGET ${TARGET_NAME} PROPERTY FRAMEWORK 1)
+!!ENDIF
+!!ENDIF // TEMPLATE != aux
+
+!!IF !equals(TEMPLATE, aux)
+!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
+ set_property(TARGET ${TARGET_NAME} PROPERTY FRAMEWORK 1)
!!ENDIF
!!ENDIF // TEMPLATE != aux
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
+!!IF !equals(TEMPLATE, aux)
+!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
+ set_property(TARGET ${TARGET_NAME} PROPERTY FRAMEWORK 1)
+!!ENDIF
+!!ENDIF // TEMPLATE != aux
+
+ set_property(TARGET ${TARGET_NAME} PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
@ -620,9 +672,12 @@ index eb7fce9645..e89cd26756 100644
+ set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_QT_ENABLED_FEATURES $$join(QT.$${MODULE}.enabled_features, ";"))
+ set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_QT_DISABLED_FEATURES $$join(QT.$${MODULE}.disabled_features, ";"))
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\")
+ set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\")
# Find plugin targets
file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/*Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
@@ -416,7 +505,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -471,7 +562,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
endforeach()
endif()
@ -634,7 +689,7 @@ index eb7fce9645..e89cd26756 100644
set_property(TARGET ${PLUGIN_TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${CONFIG})
!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
@@ -424,7 +517,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -479,7 +574,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ELSE
set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
!!ENDIF
@ -646,12 +701,16 @@ index eb7fce9645..e89cd26756 100644
set_target_properties(${PLUGIN_TARGET_NAME} PROPERTIES
\"IMPORTED_LOCATION_${CONFIG}\" ${imported_location}
)
@@ -455,16 +552,16 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -509,17 +608,20 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
endforeach()
endif()
+ # set TARGET_NAME back to current module (when loading plugin targets other modules might have been loaded in the meantime)
+ set(TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
+
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE)
- foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
+ foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
+ foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${${TARGET_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR})
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST FALSE)
endif()
@ -663,11 +722,11 @@ index eb7fce9645..e89cd26756 100644
- INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
+ add_library(${TARGET_NAME}Private INTERFACE IMPORTED)
+ set_property(TARGET ${TARGET_NAME}Private PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES ${${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
+ INTERFACE_INCLUDE_DIRECTORIES ${${TARGET_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
)
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS)
foreach(dep ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES})
@@ -473,69 +570,72 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -528,69 +630,72 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
endif()
endforeach()
!!IF !isEmpty(CMAKE_STATIC_TYPE)
@ -686,13 +745,13 @@ index eb7fce9645..e89cd26756 100644
!!IF !equals(TEMPLATE, aux)
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" )
+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
!!ELSE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
+!!ENDIF // CMAKE_STATIC_TYPE
+
@ -706,9 +765,9 @@ index eb7fce9645..e89cd26756 100644
!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC}\" \"\" )
+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
+ endif()
+!!ELSE // CMAKE_STATIC_TYPE
if (EXISTS
@ -724,9 +783,9 @@ index eb7fce9645..e89cd26756 100644
!!ELSE
\"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
!!ENDIF
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
endif()
+!!ENDIF // CMAKE_STATIC_TYPE
!!ENDIF // CMAKE_DEBUG_TYPE
@ -736,11 +795,11 @@ index eb7fce9645..e89cd26756 100644
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
!!ELSE
_populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
_populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
+!!ENDIF // CMAKE_STATIC_TYPE
@ -756,23 +815,23 @@ index eb7fce9645..e89cd26756 100644
- if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+ if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" )
!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" )
+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
+!!ELSE // CMAKE_STATIC_TYPE
if (EXISTS
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
@@ -548,7 +648,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -603,7 +708,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ELSE
\"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
!!ENDIF
- _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
- _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
endif()
!!ENDIF // CMAKE_STATIC_TYPE
@@ -558,19 +658,22 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
@@ -613,19 +718,22 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ENDIF // CMAKE_DEBUG_TYPE
!!ELSE // TEMPLATE != aux
@ -801,16 +860,30 @@ index eb7fce9645..e89cd26756 100644
endif()
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
index ec5f3cc437..1e4d98086c 100644
index 25f2162fe6..eb286293b7 100644
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
@@ -1,14 +1,22 @@
@@ -1,13 +1,13 @@
# Some Qt modules also load plugin target in extra config, so check whether the target already exists
-if(NOT TARGET Qt5::$$CMAKE_PLUGIN_NAME)
- add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
+if(NOT TARGET ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME)
+ add_library(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
!!IF !isEmpty(CMAKE_STATIC_TYPE)
set(_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_PLUGIN_MODULE_DEPS}\")
foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
- if(NOT Qt5${_module_dep}_FOUND)
- find_package(Qt5${_module_dep}
+ if(NOT ${QT_VARIANT_PREFIX}Qt5${_module_dep}_FOUND)
+ find_package(${QT_VARIANT_PREFIX}Qt5${_module_dep}
$$VERSION ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT}
${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET}
${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED}
@@ -17,14 +17,22 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
endforeach()
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
- _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
@ -819,6 +892,8 @@ index ec5f3cc437..1e4d98086c 100644
+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_MODULE_NAME ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+!!ENDIF
!!ENDIF
!!ENDIF
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
- _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
@ -850,7 +925,7 @@ index 0000000000..0091940fd2
+set(OVERRIDE_QT_VARIANT_PREFIX "${ORIGINAL_OVERRIDE_QT_VARIANT_PREFIX}")
+
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index e0652fdcf9..f0add757bb 100644
index 9b672327ef..58d1d5b366 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -1,4 +1,6 @@
@ -860,7 +935,7 @@ index e0652fdcf9..f0add757bb 100644
if (NOT TARGET Qt5::qmake)
add_executable(Qt5::qmake IMPORTED)
@@ -50,9 +52,9 @@ set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
@@ -52,9 +54,9 @@ set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
set(Qt5Core_MOC_EXECUTABLE Qt5::moc)
set(Qt5Core_RCC_EXECUTABLE Qt5::rcc)
@ -873,7 +948,7 @@ index e0652fdcf9..f0add757bb 100644
COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE
)
@@ -63,7 +65,7 @@ foreach(_dir ${_qt5_corelib_extra_includes})
@@ -65,7 +67,7 @@ foreach(_dir ${_qt5_corelib_extra_includes})
endforeach()
list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes})
@ -882,7 +957,7 @@ index e0652fdcf9..f0add757bb 100644
set(_qt5_corelib_extra_includes)
# Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The
@@ -78,7 +80,7 @@ set(Qt5_POSITION_INDEPENDENT_CODE True)
@@ -80,7 +82,7 @@ set(Qt5_POSITION_INDEPENDENT_CODE True)
# Applications now need to be compiled with the -fPIC option if the Qt option
# \"reduce relocations\" is active. For backward compatibility only, Qt accepts
# the use of -fPIE for GCC 4.x versions.
@ -891,7 +966,7 @@ index e0652fdcf9..f0add757bb 100644
# TODO Qt6: Remove
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"\")
@@ -86,7 +88,7 @@ set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"\")
@@ -88,7 +90,7 @@ set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"\")
!!IF !isEmpty(QT_NAMESPACE)
list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE)
list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE)
@ -900,7 +975,7 @@ index e0652fdcf9..f0add757bb 100644
!!ENDIF
!!IF !isEmpty(CMAKE_DISABLED_FEATURES)
@@ -95,9 +97,9 @@ set(Qt5_DISABLED_FEATURES
@@ -97,9 +99,9 @@ set(Qt5_DISABLED_FEATURES
)
!!ENDIF
@ -912,7 +987,7 @@ index e0652fdcf9..f0add757bb 100644
!!IF qtConfig(reduce_exports)
set(QT_VISIBILITY_AVAILABLE \"True\")
@@ -145,14 +147,14 @@ if (NOT TARGET Qt5::WinMain)
@@ -147,14 +149,14 @@ if (NOT TARGET Qt5::WinMain)
set(_isWin32 $<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>)
set(_isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:Qt5_NO_LINK_QTMAIN>>>)
set(_isPolicyNEW $<TARGET_POLICY:CMP0020>)
@ -974,5 +1049,5 @@ index 2a575958ae..ca0e3be3b5 100644
INTERFACE_COMPILE_DEFINITIONS QT_TESTCASE_BUILDDIR=\\\"\${CMAKE_BINARY_DIR}\\\"
)
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From e9b879ee427c9d5fcea094574c8f7ba03636fc50 Mon Sep 17 00:00:00 2001
From d214392ab20e45037c817c0150c5086993358e9f Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Jun 2017 16:42:07 +0200
Subject: [PATCH 23/33] Adjust linker flags for static build with
Subject: [PATCH 22/31] Adjust linker flags for static build with
cmake/mingw-w64
Change-Id: I33b88976d8f5ce87ce431a6f422fe87785bf5b8d
@ -10,11 +10,11 @@ Change-Id: I33b88976d8f5ce87ce431a6f422fe87785bf5b8d
1 file changed, 7 insertions(+)
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index f0add757bb..5328da2e80 100644
index 58d1d5b366..967dc64a19 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -173,3 +173,10 @@ get_filename_component(_Qt5CoreConfigDir ${CMAKE_CURRENT_LIST_FILE} PATH)
set(_Qt5CTestMacros \"${_Qt5CoreConfigDir}/Qt5CTestMacros.cmake\")
@@ -179,3 +179,10 @@ if (ANDROID_PLATFORM)
endif()
_qt5_Core_check_file_exists(${_Qt5CTestMacros})
+
@ -25,5 +25,5 @@ index f0add757bb..5328da2e80 100644
+unset(_isExe)
+!!ENDIF
--
2.22.0
2.26.0

View File

@ -1,17 +1,17 @@
From 707d13766144a4d66f10a853acada867913ef03e Mon Sep 17 00:00:00 2001
From 58af82ed3fefd7b230341376c20dc8be84c913a3 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:50:21 +0200
Subject: [PATCH 24/33] Use correct pkg-config --static flag
Subject: [PATCH 23/31] Use correct pkg-config --static flag
---
configure.pri | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configure.pri b/configure.pri
index 8e703a0975..c2857cc439 100644
index 910e59188f..aaa4123f4c 100644
--- a/configure.pri
+++ b/configure.pri
@@ -350,6 +350,9 @@ defineTest(qtConfTest_detectPkgConfig) {
@@ -345,6 +345,9 @@ defineTest(qtConfTest_detectPkgConfig) {
qtLog("Found pkg-config from path: $$pkgConfig")
}
}
@ -22,5 +22,5 @@ index 8e703a0975..c2857cc439 100644
$$qtConfEvaluate("features.cross_compile") {
# cross compiling, check that pkg-config is set up sanely
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 1ce6476fcceb489ec14dc1c8f91db4f733563b22 Mon Sep 17 00:00:00 2001
From b14162daa442d61ba3747a68aff6b0a33677e606 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 4 Dec 2016 20:35:47 +0100
Subject: [PATCH 25/33] Fix macro invoking moc, rcc and uic
Subject: [PATCH 24/31] Fix macro invoking moc, rcc and uic
* Otherwise the arguments aren't passed correctly leading to errors like
```
@ -18,10 +18,10 @@ Change-Id: I6fde86d0a3ade37b4376604a1eb6d5723eda8b4c
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index 78b99f5bfe..d383b4e4d8 100644
index 02f49a4b1e..581dbeac50 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -132,8 +132,9 @@ function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target
@@ -139,8 +139,9 @@ function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target
endif()
set(_moc_extra_parameters_file @${_moc_parameters_file})
@ -32,7 +32,7 @@ index 78b99f5bfe..d383b4e4d8 100644
DEPENDS ${infile} ${moc_depends}
${_moc_working_dir}
VERBATIM)
@@ -248,8 +249,9 @@ function(QT5_ADD_BINARY_RESOURCES target )
@@ -255,8 +256,9 @@ function(QT5_ADD_BINARY_RESOURCES target )
set(rc_depends ${rc_depends} ${_rc_depends})
endforeach()
@ -43,7 +43,7 @@ index 78b99f5bfe..d383b4e4d8 100644
ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles}
DEPENDS ${rc_depends} ${out_depends} ${infiles} VERBATIM)
add_custom_target(${target} ALL DEPENDS ${rcc_destination})
@@ -281,8 +283,9 @@ function(QT5_ADD_RESOURCES outfiles )
@@ -288,8 +290,9 @@ function(QT5_ADD_RESOURCES outfiles )
_QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends)
set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON)
@ -70,5 +70,5 @@ index 737371a5ad..d103278cdf 100644
MAIN_DEPENDENCY ${infile} VERBATIM)
set_source_files_properties(${infile} PROPERTIES SKIP_AUTOUIC ON)
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 839cd4938286ea7839fd32841cc884ee78ebe295 Mon Sep 17 00:00:00 2001
From b01de5ed0031d69b552b980214d4bfe6ce8ee52d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 20:59:54 +0100
Subject: [PATCH 26/33] Ignore errors about missing feature static
Subject: [PATCH 25/31] Ignore errors about missing feature static
Not sure why this error occurs, let's hope for the best
---
@ -10,10 +10,10 @@ Not sure why this error occurs, let's hope for the best
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 0c6c10dded..54c4b568c1 100644
index 511b158b91..39760d5ce4 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -141,5 +141,5 @@ defineTest(qtConfig) {
@@ -153,5 +153,5 @@ defineTest(qtConfig) {
contains(QT.$${module}.disabled_features, $$1): \
return(false)
}
@ -21,10 +21,10 @@ index 0c6c10dded..54c4b568c1 100644
+ !equals($$1, "static"): error("Could not find feature $${1}.")
}
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 1903e509c8..1fcb597fa3 100644
index 7777e615bd..5f30366660 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -348,5 +348,5 @@ defineTest(qtConfig) {
@@ -370,5 +370,5 @@ defineTest(qtConfig) {
contains(QT.$${module}.disabled_features, $$1): \
return(false)
}
@ -32,5 +32,5 @@ index 1903e509c8..1fcb597fa3 100644
+ !equals($$1, "static"): error("Could not find feature $${1}.")
}
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From fa70738794705c12560e2ec77316c096de8fc28a Mon Sep 17 00:00:00 2001
From e2636a2a9b11a10ba86ce55a11d29623feca0c28 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 21:08:20 +0100
Subject: [PATCH 27/33] Enable and fix use of iconv
Subject: [PATCH 26/31] Enable and fix use of iconv
Change-Id: I5f0ab27afca0800dec11c7af74d196190820ae5c
---
@ -49,7 +49,7 @@ index 9c39727946..cc14036b25 100644
#else
char **inBytesPtr = &inBytes;
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index b7eefb58c8..fef7ac57de 100644
index ae360239c6..5fd57a1a66 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -72,7 +72,7 @@
@ -61,7 +61,7 @@ index b7eefb58c8..fef7ac57de 100644
"char *outp;",
"size_t inbytes, outbytes;",
"iconv(x, &inp, &inbytes, &outp, &outbytes);",
@@ -632,9 +632,9 @@
@@ -672,9 +672,9 @@
},
"gnu-libiconv": {
"label": "GNU iconv",
@ -74,5 +74,5 @@ index b7eefb58c8..fef7ac57de 100644
},
"icu": {
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 3b8f3a5ba66f1246e64137f62e99be640550d1ed Mon Sep 17 00:00:00 2001
From 8aad5efe320b053525a8cdcf5dd498c349cd5050 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 21:08:48 +0100
Subject: [PATCH 28/33] Ignore failing pkg-config test
Subject: [PATCH 27/31] Ignore failing pkg-config test
Didn't investigate why it fails, let's hope for the best
---
@ -9,10 +9,10 @@ Didn't investigate why it fails, let's hope for the best
1 file changed, 1 deletion(-)
diff --git a/configure.json b/configure.json
index 80e15ce156..7a45887ba4 100644
index a481e54b8d..34cac288a7 100644
--- a/configure.json
+++ b/configure.json
@@ -725,7 +725,6 @@
@@ -755,7 +755,6 @@
"pkg-config": {
"label": "Using pkg-config",
"autoDetect": "!config.darwin && !config.win32",
@ -21,5 +21,5 @@ index 80e15ce156..7a45887ba4 100644
"publicFeature",
{ "type": "publicQtConfig", "negative": true },
--
2.22.0
2.26.0

View File

@ -1,43 +1,45 @@
From af12224ca1e635830342d238b30db962eb0bafe8 Mon Sep 17 00:00:00 2001
From 90787e1baa580ced40a79a20c8624ecdeee3aad4 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Tue, 7 Feb 2017 18:25:28 +0100
Subject: [PATCH 29/33] Prevent qmake from messing static lib dependencies
Subject: [PATCH 28/31] Prevent qmake from messing static lib dependencies
In particular, it messes resolving cyclic dependency between
static freetype2 and harfbuzz
Change-Id: Ie5a4e2ad96bd613ae4c26486edb30c74929459b0
---
qmake/generators/unix/unixmake.cpp | 3 +++
qmake/generators/win32/winmakefile.cpp | 3 +++
2 files changed, 6 insertions(+)
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 7f42fbe09e..e27428c0f2 100644
index f7bd6dc663..b76c444012 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -393,6 +393,9 @@ UnixMakefileGenerator::fixLibFlag(const ProString &lib)
@@ -391,6 +391,9 @@ UnixMakefileGenerator::fixLibFlag(const ProString &lib)
bool
UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
{
+ if(project->isActiveConfig("staticlib")) {
+ return false; // prevent qmake from messing static lib dependencies
+ }
QList<QMakeLocalFileName> libdirs, frameworkdirs;
QVector<QMakeLocalFileName> libdirs, frameworkdirs;
int libidx = 0, fwidx = 0;
for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 4f1a4344df..32a1ccbbf9 100644
index 3a75986257..34e7776e44 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -87,6 +87,9 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
@@ -106,6 +106,9 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB"));
impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
}
+ if(project->isActiveConfig("staticlib")) {
+ return false; // prevent qmake from messing static lib dependencies
+ }
QList<QMakeLocalFileName> dirs;
QVector<LibrarySearchPath> dirs;
int libidx = 0;
for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
--
2.22.0
2.26.0

View File

@ -1,20 +1,22 @@
From 4cf1afdd020288522af4c7ab9d872696d92074ab Mon Sep 17 00:00:00 2001
From 437223bd0628fc9f1081dc332412007df267e3fd Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 23:42:30 +0100
Subject: [PATCH 30/33] Hardcode linker flags for platform plugins
Subject: [PATCH 29/31] Hardcode linker flags for platform plugins
Otherwise incorrect order of libs leads to errors
when building libqminimal.dll, libqoffscreen.dll,
libqwindows.dll and libqdirect2d.dll
Change-Id: Ibff901ecce864ae8d5ca2adbe37bcec28e5912f3
---
src/plugins/platforms/direct2d/direct2d.pro | 30 ++++++++++++++---
src/plugins/platforms/minimal/minimal.pro | 15 +++++++--
src/plugins/platforms/offscreen/offscreen.pro | 14 ++++++--
src/plugins/platforms/windows/windows.pro | 32 +++++++++++++------
4 files changed, 73 insertions(+), 18 deletions(-)
src/plugins/platforms/windows/windows.pro | 33 +++++++++++++------
4 files changed, 73 insertions(+), 19 deletions(-)
diff --git a/src/plugins/platforms/direct2d/direct2d.pro b/src/plugins/platforms/direct2d/direct2d.pro
index 9764272632..25994da1da 100644
index 6e73bd14f9..e009a5387a 100644
--- a/src/plugins/platforms/direct2d/direct2d.pro
+++ b/src/plugins/platforms/direct2d/direct2d.pro
@@ -1,12 +1,32 @@
@ -53,8 +55,8 @@ index 9764272632..25994da1da 100644
+LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5WindowsUIAutomationSupport.$${QMAKE_EXTENSION_STATICLIB}
+INCLUDEPATH += $$QT_SOURCE_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION}
LIBS += -ldwmapi -lversion -lgdi32
QMAKE_USE_PRIVATE += dwrite_1 d2d1_1 d3d11_1 dxgi1_2
LIBS += -ldwmapi -lversion
QMAKE_USE_PRIVATE += gdi32 dwrite_1 d2d1_1 d3d11_1 dxgi1_2
diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro
index a1a2da547b..e32225d9b9 100644
--- a/src/plugins/platforms/minimal/minimal.pro
@ -107,10 +109,10 @@ index f226132592..d8ab86b322 100644
DEFINES += QT_NO_FOREACH
diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro
index 174bc7b609..285d90c6d3 100644
index 50a3bb41a9..285d90c6d3 100644
--- a/src/plugins/platforms/windows/windows.pro
+++ b/src/plugins/platforms/windows/windows.pro
@@ -1,14 +1,28 @@
@@ -1,15 +1,28 @@
TARGET = qwindows
-QT += \
@ -121,7 +123,8 @@ index 174bc7b609..285d90c6d3 100644
-qtConfig(accessibility): QT += accessibility_support-private
-qtConfig(vulkan): QT += vulkan_support-private
-
-LIBS += -lgdi32 -ldwmapi
-LIBS += -ldwmapi
-QMAKE_USE_PRIVATE += gdi32
+QT += core-private gui-private
+
+# Fix linker error when building libqwindows.dll by specifying linker flags for
@ -149,5 +152,5 @@ index 174bc7b609..285d90c6d3 100644
include(windows.pri)
--
2.22.0
2.26.0

View File

@ -1,7 +1,7 @@
From 455ddd64ae91ebc1f88933dd671ac7bd342f0d45 Mon Sep 17 00:00:00 2001
From 3888a84625dae5abbf387498fe5f39166eab17e4 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 25 Aug 2017 17:07:17 +0200
Subject: [PATCH 31/33] Fix linking against static plugins with qmake
Subject: [PATCH 30/31] Fix linking against static plugins with qmake
Required because qtConfig(static) does not work
with 'Merge shared and static library trees'
@ -11,7 +11,7 @@ approach
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 893abfcca6..34e9ec0f2f 100644
index d6299d8eed..5311748953 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -69,7 +69,7 @@ all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_d
@ -33,5 +33,5 @@ index 893abfcca6..34e9ec0f2f 100644
# Check if the plugin is known to Qt. We can use this to determine
# the plugin path. Unknown plugins must rely on the default link path.
--
2.22.0
2.26.0

View File

@ -0,0 +1,37 @@
From 68a2b716616ba060e856840cebb5601c61d60773 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Mon, 24 Jun 2019 13:51:02 +0200
Subject: [PATCH 31/31] Prevent 'Cannot find feature windows_vulkan_sdk'
See https://bugreports.qt.io/browse/QTBUG-76660
---
mkspecs/common/windows-vulkan.conf | 2 +-
mkspecs/features/qmake_use.prf | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/mkspecs/common/windows-vulkan.conf b/mkspecs/common/windows-vulkan.conf
index da061422dc..a5a8ec68d2 100644
--- a/mkspecs/common/windows-vulkan.conf
+++ b/mkspecs/common/windows-vulkan.conf
@@ -1,2 +1,2 @@
-load(windows_vulkan_sdk)
+load(win32/windows_vulkan_sdk)
QMAKE_LIBS_VULKAN =
diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf
index 8475e4111a..c0eb8faa17 100644
--- a/mkspecs/features/qmake_use.prf
+++ b/mkspecs/features/qmake_use.prf
@@ -15,7 +15,9 @@ for(ever) {
error("Library '$$lower($$replace(nu, _, -))' is not defined.")
DEFINES += $$eval(QMAKE_DEFINES_$${nu})
- INCLUDEPATH += $$eval(QMAKE_INCDIR_$${nu})
+ incdir = $$eval(QMAKE_INCDIR_$${nu})
+ !contains(QMAKE_DEFAULT_INCDIRS, $$incdir): \
+ INCLUDEPATH += $$incdir
}
LD_USES = $$resolve_depends(LD_USES, QMAKE_DEPENDS_, _LD)
for (nu, LD_USES) {
--
2.26.0

View File

@ -1,49 +0,0 @@
From 03ff76b96327c037910f0f6c41a95960aa6d6b18 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sat, 26 May 2018 03:47:14 +0200
Subject: [PATCH 32/33] Disable hardware randomizer for 32-bit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Otherwise it fails to compile src/corelib/global/qrandom.cpp:
```
during RTL pass: ira
/build/mingw-w64-qt5-base/src/qtbase-everywhere-src-5.11.0/src/corelib/global/qrandom.cpp: In function qsizetype qt_random_cpu(void*, qsizetype):
/build/mingw-w64-qt5-base/src/qtbase-everywhere-src-5.11.0/src/corelib/global/qrandom.cpp:121:1: internal compiler error: in ix86_compute_frame_layout, at config/i386/i386.c:11693
}
```
---
src/corelib/global/qrandom.cpp | 2 +-
src/corelib/global/qrandom_p.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp
index 90df8653a7..50725dc5cb 100644
--- a/src/corelib/global/qrandom.cpp
+++ b/src/corelib/global/qrandom.cpp
@@ -90,7 +90,7 @@ DECLSPEC_IMPORT BOOLEAN WINAPI SystemFunction036(PVOID RandomBuffer, ULONG Rando
QT_BEGIN_NAMESPACE
-#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
+#if defined(Q_PROCESSOR_X86_64) && QT_COMPILER_SUPPORTS_HERE(RDRND)
static qsizetype qt_random_cpu(void *buffer, qsizetype count) Q_DECL_NOTHROW;
# ifdef Q_PROCESSOR_X86_64
diff --git a/src/corelib/global/qrandom_p.h b/src/corelib/global/qrandom_p.h
index 917a91098e..c770a3e19b 100644
--- a/src/corelib/global/qrandom_p.h
+++ b/src/corelib/global/qrandom_p.h
@@ -81,7 +81,7 @@ enum { qt_randomdevice_control = 0 };
inline bool qt_has_hwrng()
{
-#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
+#if defined(Q_PROCESSOR_X86_64) && QT_COMPILER_SUPPORTS_HERE(RDRND)
return qCpuHasFeature(RDRND);
#else
return false;
--
2.22.0

View File

@ -1,37 +0,0 @@
From d15f8acb874a3ba415d2b9ead63e7c7979f637b6 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 3 Feb 2019 14:34:42 +0100
Subject: [PATCH 33/33] Prevent static build to prefer dynamic libraries
The static build should not attempt to link against dynamic libraries
in order to get a fully statically linked binary in the end.
---
mkspecs/features/qt_configure.prf | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 94eb012b81..96ea2554ec 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -577,12 +577,12 @@ defineTest(qtConfResolveLibs) {
# Under Windows, we look only for static libraries, as even for DLLs
# one actually links against a static import library.
mingw {
- lcan += \
- # MinGW supports UNIX-style library naming in addition to
- # the MSVC style.
- lib$${lib}.dll.a lib$${lib}.a \
- # Fun fact: prefix-less libraries are also supported.
- $${lib}.dll.a $${lib}.a
+ # prefer (import) libraries for dynamic linking unless we're doing a
+ # static build where we solely rely on presence of static libraries
+ shared {
+ lcan += $${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_IMPORTLIB} $${lib}.$${QMAKE_EXTENSION_IMPORTLIB}
+ }
+ lcan += $${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB} $${lib}.$${QMAKE_EXTENSION_STATICLIB}
}
lcan += $${lib}.lib
}
--
2.22.0

View File

@ -47,8 +47,8 @@ optdepends=('mingw-w64-mesa: use LLVMpipe software rasterizer for Qt Quick'
'mingw-w64-postgresql: PostgreSQL support'
'mingw-w64-mariadb-connector-c: MySQL support')
makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c'
'mingw-w64-pkg-config' 'mingw-w64-vulkan-headers')
# for running fxc
'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'mingw-w64-environment')
# For running fxc.exe WINE coulde be used:
#if isANGLE || isDynamic; then
# makedepends+=('mingw-w64-wine')
#fi
@ -70,58 +70,54 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/subm
'0013-Fix-linking-against-shared-static-MariaDB.patch'
'0014-Fix-linking-against-shared-static-PostgreSQL.patch'
'0015-Rename-qtmain-to-qt5main.patch'
'0016-Build-dynamic-host-libraries.patch'
'0017-Enable-rpath-for-build-tools.patch'
'0018-Use-system-zlib-for-build-tools.patch'
'0016-Enable-rpath-for-build-tools.patch'
'0017-Use-system-zlib-for-build-tools.patch'
'0018-Merge-shared-and-static-library-trees.patch'
'0019-Use-.dll.a-as-import-lib-extension.patch'
'0020-Merge-shared-and-static-library-trees.patch'
'0021-Pull-dependencies-of-static-libraries-in-CMake-modul.patch'
'0022-Allow-usage-of-static-version-with-CMake.patch'
'0023-Adjust-linker-flags-for-static-build-with-cmake-ming.patch'
'0024-Use-correct-pkg-config-static-flag.patch'
'0025-Fix-macro-invoking-moc-rcc-and-uic.patch'
'0026-Ignore-errors-about-missing-feature-static.patch'
'0027-Enable-and-fix-use-of-iconv.patch'
'0028-Ignore-failing-pkg-config-test.patch'
'0029-Prevent-qmake-from-messing-static-lib-dependencies.patch'
'0030-Hardcode-linker-flags-for-platform-plugins.patch'
'0031-Fix-linking-against-static-plugins-with-qmake.patch'
'0032-Disable-hardware-randomizer-for-32-bit.patch'
'0033-Prevent-static-build-to-prefer-dynamic-libraries.patch')
sha256sums=('ff6964b3b528cd3b1d21bcf3470006e8e5cbe69591923f982871d886ea0488fe'
'2df58c3c5350a7b52ed9a19b23359e8a33644012bd529fd31a42afca08a7de33'
'58473061f71f210a8344581cd5654bb6e9625cad90e63cf1f9dca063d14f187b'
'161e3e3dec7904a889bfe90bd707c00f8e2f471cde0ba7803ebd7997fc84878c'
'11b0bbb41bf8f502932f0d8d79e8470654b6adeaaec63de247d044c695e455b8'
'556c1b413d079e6f86974a576f3052645fd5919003fe38056f38a66146cc8c6d'
'f59764fa27a9d17f4651f7745416d30570d68b11813f4bc132506213a859e0c0'
'c9e4f335c8d0cf53f4ecff9b6642d34d4794b9fbd75a2fe7f4219f908e998b43'
'c11a3f2354a8c0b8e12890e09c321ac486c29f32a2702c3d123cd51b49f8152e'
'cdd71e7ea046327502872da3657132f276159f7377626a41b1a592a8aa2a435f'
'002780bf246a151763fb970234bffc9bb6f82a5e6b3c99641c455a650fad9cd6'
'e6b535f1959a1cc5b27aefd3b69f05393d0631bd384c946da278e61f1bce6da9'
'56b4695cd46189d297f8583f5d130ef2ed2a91f96ccef76d4d70b59a52da1a6e'
'1f55fbf4a5d3dfbe7a2a3f282f0e393e8c88a5b982c694cdaf557aa5508d4be8'
'39b0c2de05cf7f51a513fe555520d80cc8a22119c4e3b245459ee486f88d902b'
'9a0714b960e82e723828bd18c0bd3a722f58eacb058960aed2e9fcbe4b8d2537'
'53222828ba96831c3f1f7aeb286ad7911787d832e86fb7d80ee0b041b3ac307a'
'9dc29f85390371c29a8e48608056710a7969c1ef793e4ae20f9c5d3aeb57b60f'
'ce95915c1bda1c913a7e4a87481387cfe94eb60f5e42daa60c86982a945f5814'
'e6424d4354f0d459057dfd0b4239860c3507269497e5360244a0e4aae662fdac'
'c8ef24cae77e1a0dcb20caf41c53746e8a25791d6d4cb6433c29644ddcf91a82'
'33320bebe4320528dc9857c84f3de00182e5f95912423ff1f1a8a246a5e53de7'
'bafd944b5e6b1b83a96a600edc584f5966862b94293f1fb6c4dc5c1de5913357'
'437cba1f13db02ee5dcacd1bf18c683062966c3e3a6902f5374ba0afbd9fbea6'
'651b44f5ec594fa6cf6394b0bda2b32173505a7ef5ae71f49a4e6684b5d8a621'
'24ddc6fba6839625ed2ef7e93e1fc32a566d1113f3f05b6704f3b376b66fa33e'
'234ddf01072988172f373b0f446320c223b4b6e6df77b0c84e9932d7389ae800'
'c9bb2d2939f9304586d1b97114dbef2ee467eb2a27e7d14571285ad76507c53f'
'6538973e82566189c729b70a09a9778e004463fd567c940e760549964ce36c9a'
'2b5f7a01d7c65ea9d3c4b41b2fd4cf1816d5a42755be4e8ddd74444e6b193b92'
'c649c0f8b7173f101ece01bcc5ae43cb87577c05a82145f4329591ef22301100'
'7f27659a4cfd619d9a76238d6b82cafa506fe1186f10f4a6a6865818a6122177'
'd7095da9ed7d2807d1b4880decfdbee9f4e36e2ab4855d9258f32961835203c8'
'12f6e96911bdff51f44fa1bfcd71a41641fffcc662d3181fbe06e1ccdff24e56')
'0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch'
'0021-Allow-usage-of-static-version-with-CMake.patch'
'0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch'
'0023-Use-correct-pkg-config-static-flag.patch'
'0024-Fix-macro-invoking-moc-rcc-and-uic.patch'
'0025-Ignore-errors-about-missing-feature-static.patch'
'0026-Enable-and-fix-use-of-iconv.patch'
'0027-Ignore-failing-pkg-config-test.patch'
'0028-Prevent-qmake-from-messing-static-lib-dependencies.patch'
'0029-Hardcode-linker-flags-for-platform-plugins.patch'
'0030-Fix-linking-against-static-plugins-with-qmake.patch'
'0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch')
sha256sums=('48b9e79220941665a9dd827548c6428f7aa3052ccba8f4f7e039a94aa1d2b28a'
'c758e9ec290052a3ea029f40e5d5cfaadd2135ad7841366393449a4c71d84a88'
'a0280ed9dd31b2cdffa1c7ae25f9a6cb3a4164c76b7fa07c4e2eaa8cc01e6762'
'9a3c591e2645997a94d30687adfc08f1ea7f64597fef78c777ed7137071de02f'
'1d7fe2ef6be292e9ec84f313e4ba543f1b368a1ee0915f858d54615be93cf794'
'3099b7210a873ee12374d452fb98204d046a2d5c6b1a330d32d45ae59c95cd86'
'c2a8f4a7536ad0293bdab882d01e0055bc7d4a3e97794f7c304d01d1daa24bf7'
'3b7e90637b3a0671fac0f8607d613bf0f3f9a73cc62e43848049125c7a925a52'
'2e08efe5160c91899ac549303f888c5872e1d198068c5a00c3a34d7040f5410f'
'82764b7047b65a262f7c49305dee6579171a5e179fa85f8801d121e03937576e'
'27dd7df0721e8d4d3f4f4c30c8e9ca8793f50a04f983b3489ff1227aae996f43'
'4f0754277a14bdd8682b5d3701871f8901d2dd9f00ef8318bf6d62e9d4a26171'
'd4b3fb742c973119d1c98a34063fcc29861fa6325481a8baf5dfac13c32db597'
'd70ce95ddaa3dac7bdf273c3a8926df6b41771d75f17c68e205a1b9bb80a77e1'
'0366353ce1e4da4e800be55b457d649b0c3e6ba83a2d53dc8c6e3e08dd82637f'
'4632228567fd25ffb75de6750120c0ceea1d2c4ce2e91ef214a39b54ee7b56fc'
'ab79617e34dbc8bcefb63f0ff59a3efc5da2d313284aa3e690f8c6025a9cb090'
'b4f68710feda5c11dc2c3b4fdc755bb2186599046a8443c6f61ff9d369357193'
'a4656c1d3ec12ad50b2c92382775619d435e49a392bb08be5cbc8a654248f3dd'
'36e3520481ef8d58e7595195c0eb230df80034590c27622836a38199abf7721c'
'640ac515c0453def45cdaf2d5813d1ae95ce953014aeacb78cb1747fa2c0da3e'
'612b95a477b9956e61ac1557c0e885a7dd2ae0aa56ef69e29116cafcbc7b0d50'
'2bfb7e8400b0e14b5e8c14413d67b9fa437fe920fa9ffc458f769ea22b2bed29'
'26473b4a55ce4b764354ff54b40a6dcc6d93aea41b7175afeb1a030cb118f3a8'
'98058d1696ff05af14d10017062d697839736cf8cfef94ac77d6cefb6c46f311'
'30d2cf6c309c4922ebc4a5822aab76161950f7036666dc18489da22315ef214d'
'692c3e1679aa82c6aa395d75a06f02f0d1a0b05230197ef19fe4ef7c7b3b888e'
'c285e9900a63d67a01accd6d7a798c5f2476e90f3d8ea8ffb0f272d90d942141'
'fbd28eeed43e451240c52582f675e5f5ba069450ee20488bf993b33e76e8275c'
'1709f452c4986f6b7366412bc906b52e4a01d412e20d3fda561b7fa090ed8890'
'245af9755b5637200ea1d678e0ac1a493ed0fbcb9c25dc2a79c0a5e3c007a19a'
'810255e443f940b57e90f4934e4317c050d3edf3593cd0a30c1e2b5a35cf7f68')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
@ -148,22 +144,20 @@ prepare() {
patch -p1 -i "$patch"
done
# make sure the Qt 5 build system uses our external ANGLE library
#rm -rf src/3rdparty/angle include/QtANGLE/{EGL,GLES2,GLES3,KHR}
# make sure the Qt 5 build system uses our external PCRE library and zlib
rm -rf src/3rdparty/{pcre,zlib}
# build qmake using mingw-w64 {C,LD}FLAGS
# This also sets default {C,CXX,LD}FLAGS for projects built using qmake
CPPFLAGS="${MINGW_CPPFLAGS:--D_FORTIFY_SOURCE=2}"
CFLAGS="${MINGW_CFLAGS:-$CPPFLAGS -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4}"
CXXFLAGS="${MINGW_CXXFLAGS:-$CPPFLAGS -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4}"
LDFLAGS="${MINGW_LDFLAGS:--Wl,-O1,--sort-common,--as-needed}"
# clear buildflags ('!buildflags' only effects build() but not prepare())
unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS PKG_CONFIG_PATH
# build qmake using mingw-w64 {C,CXX,LD}FLAGS
# * This also sets default {C,CXX,LD}FLAGS for projects built using qmake.
source mingw-env
sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*=\).*$|\1 ${CFLAGS}|" \
-e "s|^\(QMAKE_CXXFLAGS_RELEASE.*=\).*$|\1 ${CXXFLAGS}|" \
-e "s|^\(QMAKE_LFLAGS_RELEASE.*=\).*$|\1 ${LDFLAGS}|" \
mkspecs/common/gcc-base.conf
mkspecs/common/gcc-base.conf \
mkspecs/common/g++-win32.conf
sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*=\).*$|\1|" \
mkspecs/common/g++-unix.conf
}
@ -171,15 +165,6 @@ prepare() {
build() {
cd "${srcdir}/${_pkgfqn}"
# do not set any flags here, flags are configured via mkspec
# (Setting flags here is not appropriate as it does not allow to
# distinguish between flags for native compiler and cross compiler.
# See prepare() function.)
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
unset PKG_CONFIG_PATH
for _arch in ${_architectures}; do
# define general configure arguments
local qt_configure_args="\
@ -267,6 +252,9 @@ build() {
# add include directory of MariaDB
qt_configure_args+=" -I/usr/${_arch}/include/mariadb"
# add include directory for Vulkan
export VULKAN_SDK=/usr/${_arch}
msg2 'Configure and build qmake'
mkdir -p ../build-${_arch} && pushd ../build-${_arch}
if isStatic; then
@ -285,8 +273,8 @@ build() {
qt_configure_args+=' -device-option CROSS_COMPILE_CUSTOM_CONFIG=actually_a_shared_build'
# override LD_LIBRARY_PATH so libraries for native build tools like libQt5Bootstrap.so are found
export LD_LIBRARY_PATH="$PWD/lib"
export LDFLAGS="-L$PWD/lib"
#export LD_LIBRARY_PATH="$PWD/lib"
#export LDFLAGS="-L$PWD/lib"
fi
msg2 'Build qmake and configure' && ../${_pkgfqn}/configure $qt_configure_args
@ -328,7 +316,22 @@ package() {
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5OpenGLExtensions* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformSupport* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5WindowsUIAutomationSupport* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5VulkanSupport* \
"${pkgdir}/usr/${_arch}/lib/"libQt5Bootstrap* \
rm -r \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5AccessibilitySupport" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5DeviceDiscoverySupport" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5EdidSupport" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5EventDispatcherSupport" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5FbSupport" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5FontDatabaseSupport" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5PlatformCompositorSupport" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5ThemeSupport" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5OpenGLExtensions*" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5WindowsUIAutomationSupport" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5VulkanSupport" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5Bootstrap" \
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5BootstrapDBus"
# ensure config files don't conflict with shared version
pushd "${pkgdir}/usr/${_arch}/lib/cmake"
@ -345,6 +348,7 @@ package() {
pushd "${pkgdir}/usr/${_arch}/lib/" && ln -s "./qt/plugins/"*/*.a . && popd
# keep a couple pri files not found in base
mv "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/qdevice.static.pri" "${pkgdir}/usr/${_arch}"
mv "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules/qt_plugin_"*.pri "${pkgdir}/usr/${_arch}"
# fix bad library order for static CMake builds caused by Qt5Gui.static.prl
@ -358,17 +362,25 @@ package() {
# move pri files back
mkdir -p "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules"
mv "${pkgdir}/usr/${_arch}/qdevice.static.pri" "${pkgdir}/usr/${_arch}/lib/qt/mkspecs"
mv "${pkgdir}/usr/${_arch}/"*.pri "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules"
else # shared version
# remove DLLs from libdir (DLLs are installed in both bindir and libdir, one copy is sufficient)
find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name "*.dll" -exec rm {} \;
# install missing libQt5BootstrapDBus.a manually
cp --target-directory "${pkgdir}/usr/${_arch}/lib" "$srcdir/build-${_arch}/lib/libQt5BootstrapDBus.a"
# create symlinks for tools
mkdir -p "${pkgdir}/usr/bin"
for tool in qmake moc rcc uic qdbuscpp2xml qdbusxml2cpp qdoc syncqt.pl; do
ln -s "../${_arch}/lib/qt/bin/${tool}" "${pkgdir}/usr/bin/${_arch}-${tool}-qt5"
done
# create qt.conf containing plugin path, see https://github.com/Martchus/PKGBUILDs/issues/109
echo "[Paths]
Plugins = /usr/${_arch}/lib/qt/plugins" > "${pkgdir}/usr/${_arch}/bin/qt.conf"
fi
# drop QMAKE_PRL_BUILD_DIR because reference the build dir
@ -393,7 +405,8 @@ package() {
# strip binaries, remove unuseful files
if ! isStatic; then
strip --strip-all "${pkgdir}/usr/${_arch}/lib/qt/bin/"*[!.pl]
strip --strip-unneeded "${pkgdir}/usr/${_arch}/lib/libQt5Bootstrap"{,DBus}.so.${pkgver}
strip --strip-debug "${pkgdir}/usr/${_arch}/lib/libQt5Bootstrap"*.a
#strip --strip-unneeded "${pkgdir}/usr/${_arch}/lib/libQt5Bootstrap"{,DBus}.so.${pkgver}
fi
if isStatic || [[ $NO_EXECUTABLES ]]; then
find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete

View File

@ -0,0 +1 @@
48b9e79220941665a9dd827548c6428f7aa3052ccba8f4f7e039a94aa1d2b28a

View File

@ -13,7 +13,7 @@
_qt_module=qtvirtualkeyboard
pkgname=mingw-w64-qt5-virtualkeyboard
#_fix_deps_of_static_3rdparty_libs='s:\(-L\/.*\/lib.*\.a\) \(\/.*\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\2\3\4 \1 \5:g' # -L is used (pre Qt 5.13)
_fix_deps_of_static_3rdparty_libs='s:\(LIBS *= *\)\(.*\)\(\/build\/.*\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\1 \3\4\5 \2 \6:g' # absolute paths are used (Qt 5.13 and above)
_fix_deps_of_static_3rdparty_libs='s:\(LIBS *= *\)\(.*\)\(\/.*\/lib\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\1 \3\4\5 \2 \6:g' # absolute paths are used (Qt 5.13 and above)
pkgver=5.14.2
pkgrel=1
arch=('any')

View File

@ -1,7 +1,7 @@
% layout 'mingw-w64-qt5-module';
\
#_fix_deps_of_static_3rdparty_libs='s:\(-L\/.*\/lib.*\.a\) \(\/.*\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\2\3\4 \1 \5:g' # -L is used (pre Qt 5.13)
_fix_deps_of_static_3rdparty_libs='s:\(LIBS *= *\)\(.*\)\(\/build\/.*\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\1 \3\4\5 \2 \6:g' # absolute paths are used (Qt 5.13 and above)
_fix_deps_of_static_3rdparty_libs='s:\(LIBS *= *\)\(.*\)\(\/.*\/lib\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\1 \3\4\5 \2 \6:g' # absolute paths are used (Qt 5.13 and above)
pkgver=5.14.2
pkgrel=1
arch=('any')