summaryrefslogtreecommitdiff
path: root/modules/tinyexr
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tinyexr')
-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) {