From 2e2ef31d412befceb34f901d6ad2ce78a43c67a2 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 21 Apr 2021 12:52:43 +0200 Subject: CMake: Fix build of QJpegPlugin in static Windows build with PCH Fails with C:\Dev\qt\src\qtbase\src\3rdparty\libjpeg\src\jmorecfg.h(242): error C2371: 'boolean': redefinition; different basic types C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared\rpcndr.h(193): note: see declaration of 'boolean' Don't use the precompiled header for the plugin source file. Amends f641a0dbcfd52e78e068357d9c66236798e043e8 Pick-to: 6.1 Task-number: QTBUG-88093 Change-Id: I6a57f791139d866622f7406fec45c11be6b86418 Reviewed-by: Joerg Bornemann --- src/plugins/imageformats/jpeg/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/imageformats/jpeg/CMakeLists.txt') diff --git a/src/plugins/imageformats/jpeg/CMakeLists.txt b/src/plugins/imageformats/jpeg/CMakeLists.txt index 4b6e11235b..fbcb10600a 100644 --- a/src/plugins/imageformats/jpeg/CMakeLists.txt +++ b/src/plugins/imageformats/jpeg/CMakeLists.txt @@ -19,6 +19,13 @@ qt_internal_add_plugin(QJpegPlugin Qt::GuiPrivate ) +# Fails to build on Windows with a static Qt, PCH enabled and +# the vendored libjpeg sources, due to 'boolean' +# redefinition in jmorecfg.h and rpcndr.h. +if(WIN32 AND NOT BUILD_SHARED_LIBS) + qt_update_ignore_pch_source(QJpegPlugin "qjpeghandler.cpp") +endif() + #### Keys ignored in scope 1:.:.:jpeg.pro:: # OTHER_FILES = "jpeg.json" -- cgit v1.2.3