From 27499d25fb6d5b12ee6f97f5a6bedcde53b2dcee Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 8 Oct 2020 19:07:57 +0200 Subject: MinGW: Fix static build using PCH The value of NTDDI_VERSION is computed from _WIN32_WINNT. It makes sense to keep these two in sync. The value used to create the PCHs for _WIN32_WINNT is 0x601, and qwindowspointerhandler.cpp requires for MinGW 0x603. Since the precompile header value cannot be undefined while compiling the source file, it's better not to use the PCH for this particular source file. These problems surface in a static build, in a regular build for some reason the PCH for plugins is not used. Change-Id: Id724490deb9c695ac00b26cd300f9d2382019ea2 Reviewed-by: Alexandru Croitor Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/windows/CMakeLists.txt b/src/plugins/platforms/windows/CMakeLists.txt index 2f1182190d..77d2f2a714 100644 --- a/src/plugins/platforms/windows/CMakeLists.txt +++ b/src/plugins/platforms/windows/CMakeLists.txt @@ -198,3 +198,9 @@ qt_internal_extend_target(QWindowsIntegrationPlugin CONDITION MINGW AND QT_FEATU PUBLIC_LIBRARIES uuid ) + +# begin special case +if (MINGW) + set_source_files_properties(qwindowspointerhandler.cpp PROPERTIES SKIP_PRECOMPILE_HEADERS ON) +endif() +# end special case -- cgit v1.2.3