diff --git a/CMakeLists.txt b/CMakeLists.txt index a8a81a781a..116d7a0ba0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,6 +164,7 @@ add_subdirectory(third-party/lzokay EXCLUDE_FROM_ALL) add_subdirectory(third-party/fmt EXCLUDE_FROM_ALL) add_subdirectory(third-party/stb_image EXCLUDE_FROM_ALL) add_subdirectory(third-party/tiny_gltf EXCLUDE_FROM_ALL) +add_subdirectory(third-party/xdelta3 EXCLUDE_FROM_ALL) # discord rich presence diff --git a/common/util/xdelta3_util.h b/common/util/xdelta3_util.h deleted file mode 100644 index 4f15fed520..0000000000 --- a/common/util/xdelta3_util.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -/*! - * @file xdelta3.h - * Interface around including xdelta3. - * C library weirdness. - */ - -#define SIZEOF_SIZE_T 8 -#define SIZEOF_UNSIGNED_LONG_LONG 8 -#include "third-party/xdelta3/xdelta3/xdelta3.h" -#include "third-party/xdelta3/xdelta3/xdelta3.c" diff --git a/decompiler/CMakeLists.txt b/decompiler/CMakeLists.txt index 82754934f4..9badadbdf2 100644 --- a/decompiler/CMakeLists.txt +++ b/decompiler/CMakeLists.txt @@ -84,6 +84,7 @@ target_link_libraries(decomp common fmt stb_image + xdelta3 ) add_executable(decompiler diff --git a/decompiler/ObjectFile/ObjectFileDB.cpp b/decompiler/ObjectFile/ObjectFileDB.cpp index 7a5acfd91a..1748df3eb4 100644 --- a/decompiler/ObjectFile/ObjectFileDB.cpp +++ b/decompiler/ObjectFile/ObjectFileDB.cpp @@ -27,7 +27,7 @@ #include "common/log/log.h" #include "common/util/json_util.h" #include "common/util/crc32.h" -#include "common/util/xdelta3_util.h" +#include "third-party/xdelta3/xdelta3.h" namespace decompiler { namespace { diff --git a/third-party/xdelta3/CMakeLists.txt b/third-party/xdelta3/CMakeLists.txt new file mode 100644 index 0000000000..d335c0d4d3 --- /dev/null +++ b/third-party/xdelta3/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(xdelta3 xdelta3.c) + diff --git a/third-party/xdelta3/xdelta3.c b/third-party/xdelta3/xdelta3.c new file mode 100644 index 0000000000..3a56b2caa6 --- /dev/null +++ b/third-party/xdelta3/xdelta3.c @@ -0,0 +1,2 @@ +#include "third-party/xdelta3/xdelta3.h" +#include "third-party/xdelta3/xdelta3/xdelta3.c" \ No newline at end of file diff --git a/third-party/xdelta3/xdelta3.h b/third-party/xdelta3/xdelta3.h new file mode 100644 index 0000000000..bec82e614b --- /dev/null +++ b/third-party/xdelta3/xdelta3.h @@ -0,0 +1,13 @@ +#pragma once + +#define SIZEOF_SIZE_T 8 +#define SIZEOF_UNSIGNED_LONG_LONG 8 + +#ifdef __cplusplus +extern "C" { +#endif +#include // missing in xdelta3 +#include "third-party/xdelta3/xdelta3/xdelta3.h" +#ifdef __cplusplus +} +#endif \ No newline at end of file