Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/cmake/platform/platform_old_libs_update.cmake')
-rw-r--r--build_files/cmake/platform/platform_old_libs_update.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/build_files/cmake/platform/platform_old_libs_update.cmake b/build_files/cmake/platform/platform_old_libs_update.cmake
index c353797cf9d..014aa198caf 100644
--- a/build_files/cmake/platform/platform_old_libs_update.cmake
+++ b/build_files/cmake/platform/platform_old_libs_update.cmake
@@ -13,7 +13,8 @@ function(unset_cache_variables pattern)
endfunction()
# Detect update from 3.1 to 3.2 libs.
-if(DEFINED OPENEXR_VERSION AND
+if(UNIX AND
+ DEFINED OPENEXR_VERSION AND
OPENEXR_VERSION VERSION_LESS "3.0.0" AND
EXISTS ${LIBDIR}/imath)
message(STATUS "Auto updating CMake configuration for Blender 3.2 libraries")
@@ -23,7 +24,14 @@ if(DEFINED OPENEXR_VERSION AND
unset_cache_variables("^IMATH")
unset_cache_variables("^PNG")
unset_cache_variables("^USD")
+ unset_cache_variables("^WEBP")
+endif()
+
+# Automatically set WebP on/off depending if libraries are available.
+if(EXISTS ${LIBDIR}/webp)
if(WITH_OPENIMAGEIO)
- set(WITH_IMAGE_WEBP ON FORCE)
+ set(WITH_IMAGE_WEBP ON CACHE BOOL "" FORCE)
endif()
+else()
+ set(WITH_IMAGE_WEBP OFF)
endif()