summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-11-19 11:17:49 +0100
committerRémi Verschelde <rverschelde@gmail.com>2021-11-19 11:25:14 +0100
commit46d3effa994b344462a86f83ed3095247dc9e1bc (patch)
tree7e5ce7ed72ea36ecfae083cb11da2d298e28e1a7 /modules
parenta777f01052161f0ea3b1344e605ac4222498395c (diff)
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.
Diffstat (limited to 'modules')
-rw-r--r--modules/tinyexr/SCsub3
-rw-r--r--modules/tinyexr/image_loader_tinyexr.cpp2
-rw-r--r--modules/tinyexr/image_saver_tinyexr.cpp2
3 files changed, 7 insertions, 0 deletions
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 <zlib.h> // Should come before including tinyexr.
+
#include "thirdparty/tinyexr/tinyexr.h"
Error ImageLoaderTinyEXR::load_image(Ref<Image> 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 <zlib.h> // Should come before including tinyexr.
+
#include "thirdparty/tinyexr/tinyexr.h"
static bool is_supported_format(Image::Format p_format) {