Bring back the USE_SHARED_LIBWEBP option.
https://github.com/aseprite/aseprite/issues/1699
https://github.com/orivej/aseprite/commit/6e3f74107c40029584c524d7458f5c5674c933c3
https://github.com/orivej/aseprite/commit/ea87e65b357ad0bd65467af5529183b5a48a8c17
--- aseprite/CMakeLists.txt.orig	2025-01-26 05:37:22.000000000 -0600
+++ aseprite/CMakeLists.txt	2025-01-26 05:39:19.000000000 -0600
@@ -73,2 +73,3 @@
 option(USE_SHARED_LIBPNG  "Use your installed copy of libpng" off)
+option(USE_SHARED_LIBWEBP "Use your installed copy of libwebp" off)
 option(USE_SHARED_TINYEXIF "Use your installed copy of TinyEXIF" off)
@@ -380,6 +381,10 @@
 
 # libwebp
 if(ENABLE_WEBP)
+  if(USE_SHARED_LIBWEBP)
+    find_library(WEBP_LIBRARIES NAMES webp REQUIRED)
+    find_path(WEBP_INCLUDE_DIR NAMES webp/decode.h REQUIRED)
+  else()
   # Use libwebp from Skia
   if(LAF_BACKEND STREQUAL "skia")
     find_library(WEBP_LIBRARIES webp
@@ -396,6 +401,7 @@
     set(WEBP_LIBRARIES webp webpdemux libwebpmux)
     set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
   endif()
+  endif()
 endif()
 message(STATUS "aseprite libwebp: ${WEBP_LIBRARIES}")
 
--- aseprite/third_party/CMakeLists.txt.orig	2022-08-02 16:55:40.000000000 -0500
+++ aseprite/third_party/CMakeLists.txt	2022-08-21 02:20:19.000000000 -0500
@@ -33,7 +33,7 @@
   add_subdirectory(giflib)
 endif()
 
-if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia")
+if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia" AND NOT USE_SHARED_LIBWEBP)
   set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.")
   set(WEBP_BUILD_ANIM_UTILS OFF CACHE BOOL "Build animation utilities.")
   set(WEBP_BUILD_CWEBP OFF CACHE BOOL "Build the cwebp command line tool.")
