Blob Blame History Raw
diff -Naur ddnet-18.0.1-orig/CMakeLists.txt ddnet-18.0.1/CMakeLists.txt
--- ddnet-18.0.1-orig/CMakeLists.txt	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/CMakeLists.txt	2024-01-26 04:13:34.970942877 +0000
@@ -544,6 +544,8 @@
   find_package(SSP)
 endif()
 
+pkg_check_modules(JSONPARSER REQUIRED json-parser)
+
 if(TARGET_OS AND TARGET_OS STREQUAL "mac")
   find_program(CMAKE_OTOOL otool)
   find_program(DMGBUILD dmgbuild)
@@ -625,6 +627,8 @@
   show_dependency_status("Vulkan" VULKAN)
 endif()
 
+show_dependency_status("json-parser" JSONPARSER)
+
 if(NOT(CURL_FOUND))
   message(SEND_ERROR "You must install Curl to compile ${CMAKE_PROJECT_NAME}")
 endif()
@@ -806,19 +810,6 @@
 # DEPENDENCY COMPILATION
 ########################################################################
 
-set_src(DEP_JSON_SRC GLOB src/engine/external/json-parser json.c json.h)
-add_library(json EXCLUDE_FROM_ALL OBJECT ${DEP_JSON_SRC})
-
-set_src(DEP_MD5_SRC GLOB src/engine/external/md5 md5.c md5.h)
-add_library(md5 EXCLUDE_FROM_ALL OBJECT ${DEP_MD5_SRC})
-
-list(APPEND TARGETS_DEP json md5)
-set(DEP_JSON $<TARGET_OBJECTS:json>)
-set(DEP_MD5)
-if(NOT CRYPTO_FOUND)
-  set(DEP_MD5 $<TARGET_OBJECTS:md5>)
-endif()
-
 ########################################################################
 # RUST
 ########################################################################
@@ -2046,13 +2037,14 @@
   src/game/generated/protocol7.h
   src/game/generated/protocolglue.h
 )
-set(DEPS ${DEP_JSON} ${DEP_MD5} ${ZLIB_DEP})
+set(DEPS ${ZLIB_DEP})
 
 # Libraries
 set(LIBS
   ${CRYPTO_LIBRARIES}
   ${CURL_LIBRARIES}
   ${SQLite3_LIBRARIES}
+  ${JSONPARSER_LIBRARIES}
   ${WEBSOCKETS_LIBRARIES}
   ${ZLIB_LIBRARIES}
   ${PLATFORM_LIBS}
diff -Naur ddnet-18.0.1-orig/src/base/hash_bundled.cpp ddnet-18.0.1/src/base/hash_bundled.cpp
--- ddnet-18.0.1-orig/src/base/hash_bundled.cpp	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/base/hash_bundled.cpp	2024-01-26 04:13:34.970942877 +0000
@@ -2,7 +2,7 @@
 
 #include "hash_ctxt.h"
 
-#include <engine/external/md5/md5.h>
+#include <md5/md5.h>
 
 void md5_update(MD5_CTX *ctxt, const void *data, size_t data_len)
 {
diff -Naur ddnet-18.0.1-orig/src/base/hash_ctxt.h ddnet-18.0.1/src/base/hash_ctxt.h
--- ddnet-18.0.1-orig/src/base/hash_ctxt.h	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/base/hash_ctxt.h	2024-01-26 04:13:34.970942877 +0000
@@ -8,7 +8,7 @@
 #include <openssl/md5.h>
 #include <openssl/sha.h>
 #else
-#include <engine/external/md5/md5.h>
+#include <md5/md5.h>
 #endif
 
 #if defined(CONF_OPENSSL)
diff -Naur ddnet-18.0.1-orig/src/engine/client/client.cpp ddnet-18.0.1/src/engine/client/client.cpp
--- ddnet-18.0.1-orig/src/engine/client/client.cpp	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/engine/client/client.cpp	2024-01-26 04:13:34.974276246 +0000
@@ -9,7 +9,7 @@
 #include <base/math.h>
 #include <base/system.h>
 
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 
 #include <engine/config.h>
 #include <engine/console.h>
diff -Naur ddnet-18.0.1-orig/src/engine/client/serverbrowser_http.cpp ddnet-18.0.1/src/engine/client/serverbrowser_http.cpp
--- ddnet-18.0.1-orig/src/engine/client/serverbrowser_http.cpp	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/engine/client/serverbrowser_http.cpp	2024-01-26 04:13:34.977609614 +0000
@@ -2,7 +2,7 @@
 
 #include <engine/console.h>
 #include <engine/engine.h>
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 #include <engine/serverbrowser.h>
 #include <engine/shared/http.h>
 #include <engine/shared/jobs.h>
diff -Naur ddnet-18.0.1-orig/src/engine/client/updater.cpp ddnet-18.0.1/src/engine/client/updater.cpp
--- ddnet-18.0.1-orig/src/engine/client/updater.cpp	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/engine/client/updater.cpp	2024-01-26 04:13:34.977609614 +0000
@@ -3,7 +3,7 @@
 #include "updater.h"
 #include <engine/client.h>
 #include <engine/engine.h>
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 #include <engine/shared/http.h>
 #include <engine/shared/json.h>
 #include <engine/storage.h>
diff -Naur ddnet-18.0.1-orig/src/engine/shared/http.cpp ddnet-18.0.1/src/engine/shared/http.cpp
--- ddnet-18.0.1-orig/src/engine/shared/http.cpp	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/engine/shared/http.cpp	2024-01-26 04:13:34.977609614 +0000
@@ -3,7 +3,7 @@
 #include <base/log.h>
 #include <base/math.h>
 #include <base/system.h>
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 #include <engine/shared/config.h>
 #include <engine/storage.h>
 #include <game/version.h>
diff -Naur ddnet-18.0.1-orig/src/engine/shared/json.h ddnet-18.0.1/src/engine/shared/json.h
--- ddnet-18.0.1-orig/src/engine/shared/json.h	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/engine/shared/json.h	2024-01-26 04:13:34.977609614 +0000
@@ -1,7 +1,7 @@
 #ifndef ENGINE_SHARED_JSON_H
 #define ENGINE_SHARED_JSON_H
 
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 
 const struct _json_value *json_object_get(const json_value *object, const char *index);
 const struct _json_value *json_array_get(const json_value *array, int index);
diff -Naur ddnet-18.0.1-orig/src/engine/shared/serverinfo.cpp ddnet-18.0.1/src/engine/shared/serverinfo.cpp
--- ddnet-18.0.1-orig/src/engine/shared/serverinfo.cpp	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/engine/shared/serverinfo.cpp	2024-01-26 04:15:32.451774843 +0000
@@ -3,7 +3,7 @@
 #include "json.h"
 #include <base/math.h>
 #include <base/system.h>
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 
 #include <cstdio>
 
diff -Naur ddnet-18.0.1-orig/src/game/server/teehistorian.cpp ddnet-18.0.1/src/game/server/teehistorian.cpp
--- ddnet-18.0.1-orig/src/game/server/teehistorian.cpp	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/game/server/teehistorian.cpp	2024-01-26 04:15:38.411779166 +0000
@@ -1,7 +1,7 @@
 #include "teehistorian.h"
 
 #include <base/system.h>
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 #include <engine/shared/config.h>
 #include <engine/shared/json.h>
 #include <engine/shared/snapshot.h>
diff -Naur ddnet-18.0.1-orig/src/test/serverinfo.cpp ddnet-18.0.1/src/test/serverinfo.cpp
--- ddnet-18.0.1-orig/src/test/serverinfo.cpp	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/test/serverinfo.cpp	2024-01-26 04:13:34.984276351 +0000
@@ -3,7 +3,7 @@
 #include <engine/serverbrowser.h>
 #include <engine/shared/serverinfo.h>
 
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 
 TEST(ServerInfo, ParseLocation)
 {
diff -Naur ddnet-18.0.1-orig/src/test/teehistorian.cpp ddnet-18.0.1/src/test/teehistorian.cpp
--- ddnet-18.0.1-orig/src/test/teehistorian.cpp	2024-01-22 21:52:08.000000000 +0000
+++ ddnet-18.0.1/src/test/teehistorian.cpp	2024-01-26 04:13:34.984276351 +0000
@@ -1,7 +1,7 @@
 #include <gtest/gtest.h>
 
 #include <base/detect.h>
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 #include <engine/server.h>
 #include <engine/shared/config.h>
 #include <game/gamecore.h>