libtiff: Merge branch 'master' into 'master' (33cda)

From 86e058e4eda824947db13e0100b637c4dbfc711c Mon Sep 17 00:00:00 2001
From: Benjamin Buch <[EMAIL REDACTED]>
Date: Wed, 24 May 2023 09:07:25 +0000
Subject: [PATCH] CMake: make WebP component name compatible with upstream
 ConfigWebP.cmake

---
 CMakeLists.txt         |  2 +-
 cmake/FindWebP.cmake   | 18 +++++++++---------
 libtiff/CMakeLists.txt |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index af5b6bfe..245fa069 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -219,7 +219,7 @@ else()
 endif()
 message(STATUS "  LZMA2 support:                      Requested:${lzma} Availability:${LIBLZMA_FOUND} Support:${LZMA_SUPPORT}")
 message(STATUS "  ZSTD support:                       Requested:${zstd} Availability:${ZSTD_USABLE} Support:${ZSTD_SUPPORT}")
-message(STATUS "  WEBP support:                       Requested:${webp} Availability:${WEBP_FOUND} Support:${WEBP_SUPPORT}")
+message(STATUS "  WEBP support:                       Requested:${webp} Availability:${WebP_FOUND} Support:${WEBP_SUPPORT}")
 message(STATUS "")
 message(STATUS "  C++ support:                        ${cxx} (requested) ${CXX_SUPPORT} (availability)")
 message(STATUS "")
diff --git a/cmake/FindWebP.cmake b/cmake/FindWebP.cmake
index 770fd979..aa3ed798 100644
--- a/cmake/FindWebP.cmake
+++ b/cmake/FindWebP.cmake
@@ -10,7 +10,7 @@ Find the native WebP includes and library.
 IMPORTED Targets
 ^^^^^^^^^^^^^^^^
 
-This module defines :prop_tgt:`IMPORTED` target ``WebP::WebP``, if
+This module defines :prop_tgt:`IMPORTED` target ``WebP::webp``, if
 WebP has been found.
 
 Result Variables
@@ -64,27 +64,27 @@ if(WebP_FOUND)
         set(WebP_LIBRARIES ${WebP_LIBRARY})
     endif()
 
-    if(NOT TARGET WebP::WebP)
-        add_library(WebP::WebP UNKNOWN IMPORTED)
-        set_target_properties(WebP::WebP PROPERTIES
+    if(NOT TARGET WebP::webp)
+        add_library(WebP::webp UNKNOWN IMPORTED)
+        set_target_properties(WebP::webp PROPERTIES
                 INTERFACE_INCLUDE_DIRECTORIES "${WebP_INCLUDE_DIRS}")
 
         if(WebP_LIBRARY_RELEASE)
-            set_property(TARGET WebP::WebP APPEND PROPERTY
+            set_property(TARGET WebP::webp APPEND PROPERTY
                     IMPORTED_CONFIGURATIONS RELEASE)
-            set_target_properties(WebP::WebP PROPERTIES
+            set_target_properties(WebP::webp PROPERTIES
                     IMPORTED_LOCATION_RELEASE "${WebP_LIBRARY_RELEASE}")
         endif()
 
         if(WebP_LIBRARY_DEBUG)
-            set_property(TARGET WebP::WebP APPEND PROPERTY
+            set_property(TARGET WebP::webp APPEND PROPERTY
                     IMPORTED_CONFIGURATIONS DEBUG)
-            set_target_properties(WebP::WebP PROPERTIES
+            set_target_properties(WebP::webp PROPERTIES
                     IMPORTED_LOCATION_DEBUG "${WebP_LIBRARY_DEBUG}")
         endif()
 
         if(NOT WebP_LIBRARY_RELEASE AND NOT WebP_LIBRARY_DEBUG)
-            set_target_properties(WebP::WebP PROPERTIES
+            set_target_properties(WebP::webp PROPERTIES
                     IMPORTED_LOCATION_RELEASE "${WebP_LIBRARY}")
         endif()
     endif()
diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt
index 7c0596dd..cd90278b 100755
--- a/libtiff/CMakeLists.txt
+++ b/libtiff/CMakeLists.txt
@@ -157,7 +157,7 @@ if(ZSTD_SUPPORT)
   string(APPEND tiff_requires_private " libzstd")
 endif()
 if(WEBP_SUPPORT)
-  target_link_libraries(tiff PRIVATE WebP::WebP)
+  target_link_libraries(tiff PRIVATE WebP::webp)
   string(APPEND tiff_requires_private " libwebp")
 endif()
 if(CMath_LIBRARY)