vcpkg/ports/openimageio/use-webp.patch

35 lines
1.2 KiB
Diff
Raw Normal View History

2018-10-21 03:37:47 +08:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index abd4e23..12a7f54 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,6 +87,7 @@ option (USE_FREETYPE "Use Freetype if found" ON)
option (USE_GIF "Use GIF if found" ON)
option (USE_PTEX "Use PTex 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 7dde986..66da94d 100644
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
@@ -366,6 +366,7 @@ endif()
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}")
@@ -382,6 +383,9 @@ else()
set (WEBP_FOUND FALSE)
message (STATUS "WebP library not found")
endif()
+else()
+ set (WEBP_FOUND FALSE)
+endif()
# end Webp setup
###########################################################################