2023-09-22 08:47:23 -06:00
|
|
|
diff -Naur oiio-2.4.15.0/src/cmake/modules/FindWebP.cmake external_openimageio/src/cmake/modules/FindWebP.cmake
|
|
|
|
--- oiio-2.4.15.0/src/cmake/modules/FindWebP.cmake 2023-09-01 10:48:29.000000000 -0600
|
|
|
|
+++ external_openimageio/src/cmake/modules/FindWebP.cmake 2023-09-21 14:47:19.366083900 -0600
|
|
|
|
@@ -25,15 +25,30 @@
|
|
|
|
ENV WEBP_INCLUDE_PATH
|
|
|
|
DOC "The directory where Webp headers reside")
|
|
|
|
|
|
|
|
-find_library (WEBP_LIBRARY webp
|
|
|
|
+find_library (WEBP_LIBRARY
|
|
|
|
+ NAMES
|
|
|
|
+ webp
|
|
|
|
+ libwebp
|
2023-09-21 17:02:46 +02:00
|
|
|
HINTS
|
|
|
|
${WEBP_LIBRARY_PATH}
|
|
|
|
ENV WEBP_LIBRARY_PATH)
|
2023-09-22 08:47:23 -06:00
|
|
|
-find_library (WEBPDEMUX_LIBRARY webpdemux
|
|
|
|
+find_library (WEBPDEMUX_LIBRARY
|
|
|
|
+ NAMES
|
|
|
|
+ webpdemux
|
|
|
|
+ libwebpdemux
|
2023-09-21 17:02:46 +02:00
|
|
|
+ HINTS
|
|
|
|
+ ${WEBP_LIBRARY_PATH}
|
|
|
|
+ ENV WEBP_LIBRARY_PATH)
|
2023-09-22 08:47:23 -06:00
|
|
|
+# New in WebP 1.3
|
|
|
|
+find_library (WEBP_SHARPYUV_LIBRARY
|
|
|
|
+ NAMES
|
|
|
|
+ sharpyuv
|
|
|
|
+ libsharpyuv
|
|
|
|
HINTS
|
|
|
|
${WEBP_LIBRARY_PATH}
|
|
|
|
ENV WEBP_LIBRARY_PATH)
|
2023-09-21 17:02:46 +02:00
|
|
|
|
2023-09-22 08:47:23 -06:00
|
|
|
+
|
2023-09-21 17:02:46 +02:00
|
|
|
include (FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args (WebP
|
2023-09-22 08:47:23 -06:00
|
|
|
REQUIRED_VARS WEBP_INCLUDE_DIR
|
|
|
|
@@ -42,7 +57,7 @@
|
2023-09-21 17:02:46 +02:00
|
|
|
|
|
|
|
if (WebP_FOUND)
|
|
|
|
set (WEBP_INCLUDES "${WEBP_INCLUDE_DIR}")
|
|
|
|
- set (WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY})
|
|
|
|
+ set (WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY} ${WEBP_SHARPYUV_LIBRARY})
|
|
|
|
|
2023-09-22 08:47:23 -06:00
|
|
|
if (NOT TARGET WebP::webp)
|
|
|
|
add_library(WebP::webp UNKNOWN IMPORTED)
|
|
|
|
@@ -58,10 +73,18 @@
|
|
|
|
set_property(TARGET WebP::webpdemux APPEND PROPERTY
|
2023-09-21 17:02:46 +02:00
|
|
|
IMPORTED_LOCATION ${WEBPDEMUX_LIBRARY})
|
|
|
|
endif ()
|
|
|
|
+ if (WEBP_SHARPYUV_LIBRARY AND NOT TARGET WebP::sharpyuv)
|
|
|
|
+ add_library(WebP::sharpyuv UNKNOWN IMPORTED)
|
|
|
|
+ set_target_properties(WebP::sharpyuv PROPERTIES
|
|
|
|
+ INTERFACE_INCLUDE_DIRECTORIES ${WEBP_INCLUDES})
|
|
|
|
+ set_property(TARGET WebP::sharpyuv APPEND PROPERTY
|
|
|
|
+ IMPORTED_LOCATION ${WEBP_SHARPYUV_LIBRARY})
|
|
|
|
+ endif ()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
mark_as_advanced (
|
|
|
|
WEBP_INCLUDE_DIR
|
|
|
|
WEBP_LIBRARY
|
|
|
|
WEBPDEMUX_LIBRARY
|
|
|
|
+ WEBP_SHARPYUV_LIBRARY
|
|
|
|
)
|
|
|
|
|
|
|
|
diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt
|
|
|
|
index ccf1146..c646e99 100644
|
|
|
|
--- a/src/webp.imageio/CMakeLists.txt
|
|
|
|
+++ b/src/webp.imageio/CMakeLists.txt
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
|
|
if (WebP_FOUND)
|
|
|
|
add_oiio_plugin (webpinput.cpp webpoutput.cpp
|
|
|
|
- LINK_LIBRARIES WebP::webp WebP::webpdemux
|
|
|
|
+ LINK_LIBRARIES WebP::webp WebP::webpdemux WebP::sharpyuv
|
|
|
|
DEFINITIONS "-DUSE_WEBP=1")
|
|
|
|
else ()
|
|
|
|
message (STATUS "WebP plugin will not be built")
|