diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-04-21 12:52:43 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-04-21 15:21:05 +0200 |
commit | 2e2ef31d412befceb34f901d6ad2ce78a43c67a2 (patch) | |
tree | 8b25f89a90af1773b93bbae3bd33ac7e2101df98 | |
parent | 41af29238ce08d025ad4e6d1df6c4b38ae46f929 (diff) |
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 <joerg.bornemann@qt.io>
-rw-r--r-- | src/plugins/imageformats/jpeg/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
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:<TRUE>: # OTHER_FILES = "jpeg.json" |