From c6ddb6ef892cbd2bc9a8cf0b0908c1f47d2d1071 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Wed, 10 Sep 2025 13:45:45 +0200 Subject: [PATCH] Fix static CMake build using external WebP library Define WebP_LIBRARIES and WebP_INCLUDE_DIRS in the parent scope, otherwise the caller never gets the values found by either find_package() or pkg_check_modules(). Closes #25786. --- build/cmake/modules/FindWebP.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/cmake/modules/FindWebP.cmake b/build/cmake/modules/FindWebP.cmake index d28f530503..54119f7c2e 100644 --- a/build/cmake/modules/FindWebP.cmake +++ b/build/cmake/modules/FindWebP.cmake @@ -6,3 +6,6 @@ if(NOT WebP_FOUND) pkg_check_modules(WebP libwebp) endif() endif() + +set(WebP_LIBRARIES ${WebP_LIBRARIES} PARENT_SCOPE) +set(WebP_INCLUDE_DIRS ${WebP_INCLUDE_DIRS} PARENT_SCOPE)