diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-01-20 14:30:21 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-01-21 19:55:27 +0100 |
commit | a585ce70562cae09643e6eb488d457f7755c7c90 (patch) | |
tree | 8c9e5260b85a5fab4c1b043ad661a078ff7f71d6 /mkspecs | |
parent | eced23b6a80bdb88b9fa6ef18ad882f1a5ceb353 (diff) | |
download | qtbase-a585ce70562cae09643e6eb488d457f7755c7c90.tar.gz |
qmake: Allow using Windows 10 API in MinGW qmake internal projects
When trying to build qt3d examples with qmake and MinGW in the CI,
compilation would fail with errors like
In file included from
C:/MINGW1120/mingw64/x86_64-w64-mingw32/include/windows.h:72,
from C:\Users\qt\work\qt\qt3d\examples\qt3d\simple-cpp\main.cpp:63
include/winuser.h:2965:72: error: 'POINTER_INPUT_TYPE' was not
declared in this scope
What happens is that calling qmake on examples.pro loads
qt3d/.qmake.conf, which then loads qt_build_config.prf which then
defines the following definitions:
mingw: DEFINES += WINVER=0x0601 _WIN32_WINNT=0x0601
This limits usage of Windows API up to Windows 7, with later APIs
being unavailable.
Most .qmake.conf files were removed in qt repos, but We didn't remove
the .qmake.conf file (fb656c036db0549180073e133773862d08f6cd24) for
qt3d because it's supposed to be buildable with CMake + Qt 6 as
well as qmake + Qt 5.
Bump the defines to the same Windows 10 version we use everywhere else
when building with CMake.
Amends 6652bf2353d807f724f398a15cb22c188830f57c
Relates to d57a7c41712f8627a462d893329dc3f0dbb52d32
Relates to fb656c036db0549180073e133773862d08f6cd24
Pick-to: 6.2 6.3
Task-number: COIN-762
Task-number: QTBUG-92271
Change-Id: I833dfb6b0832d90a76d05ea14cd3807cb0d67ca9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/qt_build_config.prf | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 55e01e4a65..1eab561ef7 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -112,7 +112,7 @@ unix: CONFIG += explicitlib macos: CONFIG += testcase_no_bundle # Override MinGW's definition in _mingw.h -mingw: DEFINES += WINVER=0x0601 _WIN32_WINNT=0x0601 +mingw: DEFINES += WINVER=0x0A00 _WIN32_WINNT=0x0A00 defineTest(qtBuildPart) { bp = $$eval($$upper($$section(_QMAKE_CONF_, /, -2, -2))_BUILD_PARTS) |