From 46d3effa994b344462a86f83ed3095247dc9e1bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 19 Nov 2021 11:17:49 +0100 Subject: tinyexr: Sync with upstream 1.0.1 Removes miniz as a bundled dependency, relies on our own zlib instead. Includes a couple commits ahead of `v1.0.1` tag to fix MinGW builds. --- modules/tinyexr/SCsub | 3 +++ modules/tinyexr/image_loader_tinyexr.cpp | 2 ++ modules/tinyexr/image_saver_tinyexr.cpp | 2 ++ 3 files changed, 7 insertions(+) (limited to 'modules/tinyexr') diff --git a/modules/tinyexr/SCsub b/modules/tinyexr/SCsub index 30bde96fb4..bf9242cc16 100644 --- a/modules/tinyexr/SCsub +++ b/modules/tinyexr/SCsub @@ -20,6 +20,9 @@ env_tinyexr.Prepend(CPPPATH=[thirdparty_dir]) # Enable threaded loading with C++11. env_tinyexr.Append(CPPDEFINES=["TINYEXR_USE_THREAD"]) +# miniz is an external dependency, we could add it but we can instead rely +# on our existing bundled zlib. +env_tinyexr.Append(CPPDEFINES=[("TINYEXR_USE_MINIZ", 0)]) env_thirdparty = env_tinyexr.Clone() env_thirdparty.disable_warnings() diff --git a/modules/tinyexr/image_loader_tinyexr.cpp b/modules/tinyexr/image_loader_tinyexr.cpp index eb7a8597e6..6c4c06aab0 100644 --- a/modules/tinyexr/image_loader_tinyexr.cpp +++ b/modules/tinyexr/image_loader_tinyexr.cpp @@ -33,6 +33,8 @@ #include "core/os/os.h" #include "core/string/print_string.h" +#include // Should come before including tinyexr. + #include "thirdparty/tinyexr/tinyexr.h" Error ImageLoaderTinyEXR::load_image(Ref p_image, FileAccess *f, bool p_force_linear, float p_scale) { diff --git a/modules/tinyexr/image_saver_tinyexr.cpp b/modules/tinyexr/image_saver_tinyexr.cpp index 6a2fb0f666..f64acf8395 100644 --- a/modules/tinyexr/image_saver_tinyexr.cpp +++ b/modules/tinyexr/image_saver_tinyexr.cpp @@ -31,6 +31,8 @@ #include "image_saver_tinyexr.h" #include "core/math/math_funcs.h" +#include // Should come before including tinyexr. + #include "thirdparty/tinyexr/tinyexr.h" static bool is_supported_format(Image::Format p_format) { -- cgit v1.2.3