make xdelta3 a separate library

This commit is contained in:
water 2022-06-21 21:47:06 -04:00
parent d837b05453
commit b605ed7ae1
7 changed files with 20 additions and 13 deletions

View File

@ -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

View File

@ -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"

View File

@ -84,6 +84,7 @@ target_link_libraries(decomp
common
fmt
stb_image
xdelta3
)
add_executable(decompiler

View File

@ -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 {

2
third-party/xdelta3/CMakeLists.txt generated vendored Normal file
View File

@ -0,0 +1,2 @@
add_library(xdelta3 xdelta3.c)

2
third-party/xdelta3/xdelta3.c generated vendored Normal file
View File

@ -0,0 +1,2 @@
#include "third-party/xdelta3/xdelta3.h"
#include "third-party/xdelta3/xdelta3/xdelta3.c"

13
third-party/xdelta3/xdelta3.h generated vendored Normal file
View File

@ -0,0 +1,13 @@
#pragma once
#define SIZEOF_SIZE_T 8
#define SIZEOF_UNSIGNED_LONG_LONG 8
#ifdef __cplusplus
extern "C" {
#endif
#include <assert.h> // missing in xdelta3
#include "third-party/xdelta3/xdelta3/xdelta3.h"
#ifdef __cplusplus
}
#endif