vcpkg/ports/openimageio/use-webp.patch

35 lines
1.2 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f43455..393af70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,6 +96,7 @@ option (USE_GIF "Use GIF if found" ON)
option (USE_PTEX "Use PTex if found" ON)
option (USE_WEBP "Use WebP if found" ON)
option (USE_LIBRAW "Use LibRaw if found" ON)
+option (USE_WEBP "Use WebP if found" ON)
set (LIBRAW_PATH "" CACHE STRING "Custom LibRaw path")
option (OIIO_THREAD_ALLOW_DCLP "OIIO threads may use DCLP for speed" ON)
option (USE_NUKE "Build Nuke plugins, if Nuke is found" ON)
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
index f2709d0..3a95da6 100644
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
@@ -411,6 +411,7 @@ if (USE_WEBP)
if (NOT WEBP_FIND_QUIETLY)
message (STATUS "WEBP_HOME=${WEBP_HOME}")
endif ()
+ if(USE_WEBP)
find_path (WEBP_INCLUDE_DIR webp/encode.h
"${PROJECT_SOURCE_DIR}/src/include"
"${WEBP_HOME}")
@@ -427,6 +428,9 @@ if (USE_WEBP)
set (WEBP_FOUND FALSE)
message (STATUS "WebP library not found")
endif()
+ else()
+ set (WEBP_FOUND FALSE)
+ endif()
else ()
message (STATUS "Not using WebP")
endif ()