summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/jpeg/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/imageformats/jpeg/CMakeLists.txt')
-rw-r--r--src/plugins/imageformats/jpeg/CMakeLists.txt23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/plugins/imageformats/jpeg/CMakeLists.txt b/src/plugins/imageformats/jpeg/CMakeLists.txt
index 6aaa6538ec..6b077a7647 100644
--- a/src/plugins/imageformats/jpeg/CMakeLists.txt
+++ b/src/plugins/imageformats/jpeg/CMakeLists.txt
@@ -1,24 +1,29 @@
-# Generated from jpeg.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
-qt_find_package(JPEG) # special case
+qt_find_package(WrapJpeg PROVIDED_TARGETS WrapJpeg::WrapJpeg)
#####################################################################
## QJpegPlugin Plugin:
#####################################################################
-qt_add_plugin(QJpegPlugin
+qt_internal_add_plugin(QJpegPlugin
OUTPUT_NAME qjpeg
- TYPE imageformats
+ PLUGIN_TYPE imageformats
SOURCES
- main.cpp main.h
+ main.cpp
qjpeghandler.cpp qjpeghandler_p.h
- PUBLIC_LIBRARIES
- JPEG::JPEG
+ LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
+ WrapJpeg::WrapJpeg
)
-#### Keys ignored in scope 1:.:.:jpeg.pro:<TRUE>:
-# OTHER_FILES = "jpeg.json"
+# 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()