summaryrefslogtreecommitdiff
path: root/thirdparty/basis_universal/patches/basisu-pr344.patch
blob: 37390d3534baae533ce8e89691f85a8970adaa3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From b4a0fa23c13da413d94b99f307e401c3b83e0108 Mon Sep 17 00:00:00 2001
From: Ondrej Stava <ondrej.stava@gmail.com>
Date: Fri, 23 Apr 2021 18:59:45 -0700
Subject: [PATCH] Made it easier to use the library with external zstdlib
 implementations (mostly in non CMake builds).
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

In our internal repository, we have our own version of zstdlib and introducing extra copy is both undesirable and potentially dangerous (due to ODR violations).

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
---
 encoder/basisu_comp.cpp          | 2 +-
 transcoder/basisu_transcoder.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/encoder/basisu_comp.cpp b/encoder/basisu_comp.cpp
index 41eae2b7..4e69e9e2 100644
--- a/encoder/basisu_comp.cpp
+++ b/encoder/basisu_comp.cpp
@@ -28,7 +28,7 @@
 #endif
 
 #if BASISD_SUPPORT_KTX2_ZSTD
-#include "../zstd/zstd.h"
+#include <zstd.h>
 #endif
 
 // Set to 1 to disable the mipPadding alignment workaround (which only seems to be needed when no key-values are written at all)
diff --git a/transcoder/basisu_transcoder.cpp b/transcoder/basisu_transcoder.cpp
index 3aeba0ee..c698861f 100644
--- a/transcoder/basisu_transcoder.cpp
+++ b/transcoder/basisu_transcoder.cpp
@@ -155,7 +155,7 @@
    // If BASISD_SUPPORT_KTX2_ZSTD is 0, UASTC files compressed with Zstd cannot be loaded.
 	#if BASISD_SUPPORT_KTX2_ZSTD
 		// We only use two Zstd API's: ZSTD_decompress() and ZSTD_isError()
-		#include "../zstd/zstd.h"
+		#include <zstd.h>
 	#endif
 #endif