diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-04-19 21:01:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-04-19 21:09:23 +0300 |
commit | bd65ced04ae7d3451705c1bff15624d02307e351 (patch) | |
tree | 30b66776a0737d64546c3e0ba457331fb068c4b2 | |
parent | 7447ffdf8bfc33a1c4fba8d2d3795ea83d78bc3f (diff) |
Build: enable WebP by default again, but auto disable for old libstmp_lib_update_32
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | build_files/cmake/config/blender_full.cmake | 1 | ||||
-rw-r--r-- | build_files/cmake/config/blender_lite.cmake | 1 | ||||
-rw-r--r-- | build_files/cmake/config/blender_release.cmake | 1 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_apple.cmake | 1 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_old_libs_update.cmake | 12 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_unix.cmake | 5 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 2 |
8 files changed, 19 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f5a7563cdc..2cc9466c2ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,7 +284,7 @@ option(WITH_IMAGE_TIFF "Enable LibTIFF Support" ON) option(WITH_IMAGE_DDS "Enable DDS Image Support" ON) option(WITH_IMAGE_CINEON "Enable CINEON and DPX Image Support" ON) option(WITH_IMAGE_HDR "Enable HDR Image Support" ON) -option(WITH_IMAGE_WEBP "Enable WebP Image Support" OFF) +option(WITH_IMAGE_WEBP "Enable WebP Image Support" ON) # Audio/Video format support option(WITH_CODEC_AVI "Enable Blenders own AVI file support (raw/jpeg)" ON) diff --git a/build_files/cmake/config/blender_full.cmake b/build_files/cmake/config/blender_full.cmake index 9faa0118ae2..e09577ac802 100644 --- a/build_files/cmake/config/blender_full.cmake +++ b/build_files/cmake/config/blender_full.cmake @@ -30,6 +30,7 @@ set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE) set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE) set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE) set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE) +set(WITH_IMAGE_WEBP ON CACHE BOOL "" FORCE) set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE) set(WITH_INPUT_IME ON CACHE BOOL "" FORCE) set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE) diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake index 2d895f55c31..2f6057ee9c0 100644 --- a/build_files/cmake/config/blender_lite.cmake +++ b/build_files/cmake/config/blender_lite.cmake @@ -34,6 +34,7 @@ set(WITH_IMAGE_HDR OFF CACHE BOOL "" FORCE) set(WITH_IMAGE_OPENEXR OFF CACHE BOOL "" FORCE) set(WITH_IMAGE_OPENJPEG OFF CACHE BOOL "" FORCE) set(WITH_IMAGE_TIFF OFF CACHE BOOL "" FORCE) +set(WITH_IMAGE_WEBP OFF CACHE BOOL "" FORCE) set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE) set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE) set(WITH_JACK OFF CACHE BOOL "" FORCE) diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake index 4e96975bd90..8ece5eec39e 100644 --- a/build_files/cmake/config/blender_release.cmake +++ b/build_files/cmake/config/blender_release.cmake @@ -31,6 +31,7 @@ set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE) set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE) set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE) set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE) +set(WITH_IMAGE_WEBP ON CACHE BOOL "" FORCE) set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE) set(WITH_INPUT_IME ON CACHE BOOL "" FORCE) set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE) diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index 0c999118c74..91d0b54e426 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -72,7 +72,6 @@ set(CMAKE_PREFIX_PATH ${LIB_SUBDIRS}) if(EXISTS ${LIBDIR}) include(platform_old_libs_update) - without_system_libs_begin() endif() 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() diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index ac9fa103c3a..6750c23d548 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -45,6 +45,9 @@ if(EXISTS ${LIBDIR}) # which is a part of OpenCollada. They have different ABI, and we # do need to use the official one. set(CMAKE_PREFIX_PATH ${LIBDIR}/zlib ${LIB_SUBDIRS}) + + include(platform_old_libs_update) + set(WITH_STATIC_LIBS ON) # OpenMP usually can't be statically linked into shared libraries, # due to not being compiled with position independent code. @@ -57,8 +60,6 @@ if(EXISTS ${LIBDIR}) set(Boost_NO_SYSTEM_PATHS ON) set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr) set(CLANG_ROOT_DIR ${LIBDIR}/llvm) - - include(platform_old_libs_update) endif() if(WITH_STATIC_LIBS) diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 2396f548602..c5d2049b292 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -262,6 +262,8 @@ if(NOT EXISTS "${LIBDIR}/") message(FATAL_ERROR "\n\nWindows requires pre-compiled libs at: '${LIBDIR}'. Please run `make update` in the blender source folder to obtain them.") endif() +include(platform_old_libs_update) + if(CMAKE_GENERATOR MATCHES "^Visual Studio.+" AND # Only supported in the VS IDE MSVC_VERSION GREATER_EQUAL 1924 AND # Supported for 16.4+ WITH_CLANG_TIDY # And Clang Tidy needs to be on |