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

Task-number: QTBUG-88093
Change-Id: I6a57f791139d866622f7406fec45c11be6b86418
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 2e2ef31d412befceb34f901d6ad2ce78a43c67a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2021-04-21 12:52:43 +02:00 committed by Qt Cherry-pick Bot
parent ae62c5717e
commit 51c6e25d09

View File

@ -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:<TRUE>:
# OTHER_FILES = "jpeg.json"