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.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/plugins/imageformats/jpeg/CMakeLists.txt b/src/plugins/imageformats/jpeg/CMakeLists.txt
new file mode 100644
index 0000000000..6b077a7647
--- /dev/null
+++ b/src/plugins/imageformats/jpeg/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+qt_find_package(WrapJpeg PROVIDED_TARGETS WrapJpeg::WrapJpeg)
+
+#####################################################################
+## QJpegPlugin Plugin:
+#####################################################################
+
+qt_internal_add_plugin(QJpegPlugin
+ OUTPUT_NAME qjpeg
+ PLUGIN_TYPE imageformats
+ SOURCES
+ main.cpp
+ qjpeghandler.cpp qjpeghandler_p.h
+ LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ WrapJpeg::WrapJpeg
+)
+
+# 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()