summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-06-05 22:45:38 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-06-06 13:45:05 +0000
commite970e4a394c4e2f9d9fc50a31657cbddcb64d501 (patch)
tree6071f942e411ce0df297b3ecc8151c4457e0415e /src
parent2a9ae46b62e90db58c2d81a70feb5b884c9994d0 (diff)
Fix qtimageformats building
Some feature conditions were incorrect. Added forgotten FindWrapWebP.cmake file. Protect call to qt_find_package ZLIB. Change-Id: I033d38e4f69e94f7b72346b49bf6de4b2dbde8e0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/imageformats/configure.cmake4
-rw-r--r--src/plugins/imageformats/tiff/CMakeLists.txt11
2 files changed, 12 insertions, 3 deletions
diff --git a/src/imageformats/configure.cmake b/src/imageformats/configure.cmake
index ca7e753..3100bf6 100644
--- a/src/imageformats/configure.cmake
+++ b/src/imageformats/configure.cmake
@@ -38,7 +38,7 @@ qt_feature("mng" PRIVATE
)
qt_feature("tiff" PRIVATE
LABEL "TIFF"
- CONDITION QT_FEATURE_imageformatplugin
+ CONDITION QT_FEATURE_imageformatplugin AND TIFF_FOUND
DISABLE INPUT_tiff STREQUAL 'no'
)
qt_feature("system_tiff" PRIVATE
@@ -49,7 +49,7 @@ qt_feature("system_tiff" PRIVATE
)
qt_feature("webp" PRIVATE
LABEL "WEBP"
- CONDITION QT_FEATURE_imageformatplugin
+ CONDITION QT_FEATURE_imageformatplugin AND WrapWebP_FOUND
DISABLE INPUT_webp STREQUAL 'no'
)
qt_feature("system_webp" PRIVATE
diff --git a/src/plugins/imageformats/tiff/CMakeLists.txt b/src/plugins/imageformats/tiff/CMakeLists.txt
index 1e5b555..d831693 100644
--- a/src/plugins/imageformats/tiff/CMakeLists.txt
+++ b/src/plugins/imageformats/tiff/CMakeLists.txt
@@ -4,7 +4,16 @@
## qtiff Plugin:
#####################################################################
-qt_find_package(ZLIB PROVIDED_TARGETS ZLIB::ZLIB) # special case
+# special case begin
+# Protect against case when ZLIB is found via QtGui in a static build,
+# which means that we can't do a qt_find_package() here due to CMake
+# complaining about not being able to make the ZLIB target global,
+# because ZLIB was found in the QtGui directory scope (root level) and
+# not in this directory scope.
+if(BUILD_SHARED_LIBS)
+ qt_find_package(ZLIB PROVIDED_TARGETS ZLIB::ZLIB)
+endif()
+# special case end
add_qt_plugin(qtiff
TYPE imageformats