From c207c776325a8e59c67c2b040836c8f5e2a58a8a Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sat, 9 Sep 2023 21:16:22 +0200
Subject: [PATCH] bump libwebp from 1.0.3 (April 2022) -> 1.3.2 (September
2023)
---
.gitmodules | 2 +-
CMakeLists.txt | 4 ++++
cmake/SDL3_imageConfig.cmake.in | 3 +++
external/libwebp | 2 +-
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/.gitmodules b/.gitmodules
index 13007662..122d5025 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -13,7 +13,7 @@
[submodule "external/libwebp"]
path = external/libwebp
url = https://github.com/libsdl-org/libwebp.git
- branch = 1.0.3-SDL
+ branch = 1.3.2-SDL
[submodule "external/libtiff"]
path = external/libtiff
url = https://github.com/libsdl-org/libtiff.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4bc670d9..2b69e35d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -664,8 +664,12 @@ if(SDL3IMAGE_WEBP)
add_library(WebP::webp ALIAS webp)
add_library(WebP::webpdemux ALIAS webpdemux)
list(APPEND INSTALL_EXTRA_TARGETS webp webpdemux)
+ if(NOT BUILD_SHARED_LIBS)
+ list(APPEND INSTALL_EXTRA_TARGETS sharpyuv)
+ endif()
set_target_properties(webp PROPERTIES EXPORT_NAME "external_libwebp")
set_target_properties(webpdemux PROPERTIES EXPORT_NAME "external_webpdemux")
+ set_target_properties(sharpyuv PROPERTIES EXPORT_NAME "external_sharpyuv")
add_library(SDL3_image::external_libwebp ALIAS webp)
else()
message(STATUS "${PROJECT_NAME}: Using system libwebp")
diff --git a/cmake/SDL3_imageConfig.cmake.in b/cmake/SDL3_imageConfig.cmake.in
index f6ac36b9..ddac56f3 100644
--- a/cmake/SDL3_imageConfig.cmake.in
+++ b/cmake/SDL3_imageConfig.cmake.in
@@ -44,6 +44,9 @@ endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3_image-static-targets.cmake")
if(SDL3IMAGE_VENDORED)
+ if(SDL3IMAGE_WEBP)
+ find_package(Threads)
+ endif()
if(SDL3IMAGE_JXL)
include(CheckLanguage)
check_language(CXX)
diff --git a/external/libwebp b/external/libwebp
index f2edda16..6c43a10b 160000
--- a/external/libwebp
+++ b/external/libwebp
@@ -1 +1 @@
-Subproject commit f2edda16ebfcee145a813dc674fe7fb89e274da9
+Subproject commit 6c43a10b293f4d00134a4d40a2151722e4655306