Blender build data
This commit is contained in:
78
blender-build/build_environment/patches/oiio_webp.diff
Normal file
78
blender-build/build_environment/patches/oiio_webp.diff
Normal file
@@ -0,0 +1,78 @@
|
||||
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
|
||||
HINTS
|
||||
${WEBP_LIBRARY_PATH}
|
||||
ENV WEBP_LIBRARY_PATH)
|
||||
-find_library (WEBPDEMUX_LIBRARY webpdemux
|
||||
+find_library (WEBPDEMUX_LIBRARY
|
||||
+ NAMES
|
||||
+ webpdemux
|
||||
+ libwebpdemux
|
||||
+ HINTS
|
||||
+ ${WEBP_LIBRARY_PATH}
|
||||
+ ENV WEBP_LIBRARY_PATH)
|
||||
+# New in WebP 1.3
|
||||
+find_library (WEBP_SHARPYUV_LIBRARY
|
||||
+ NAMES
|
||||
+ sharpyuv
|
||||
+ libsharpyuv
|
||||
HINTS
|
||||
${WEBP_LIBRARY_PATH}
|
||||
ENV WEBP_LIBRARY_PATH)
|
||||
|
||||
+
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (WebP
|
||||
REQUIRED_VARS WEBP_INCLUDE_DIR
|
||||
@@ -42,7 +57,7 @@
|
||||
|
||||
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})
|
||||
|
||||
if (NOT TARGET WebP::webp)
|
||||
add_library(WebP::webp UNKNOWN IMPORTED)
|
||||
@@ -58,10 +73,18 @@
|
||||
set_property(TARGET WebP::webpdemux APPEND PROPERTY
|
||||
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")
|
||||
Reference in New Issue
Block a user