File: use-system-libjsonparser.patch

package info (click to toggle)
ddnet 19.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 68,960 kB
  • sloc: cpp: 195,050; ansic: 58,572; python: 5,568; asm: 946; sh: 941; java: 366; xml: 206; makefile: 31
file content (129 lines) | stat: -rw-r--r-- 3,731 bytes parent folder | download
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -824,7 +824,7 @@
 add_library(md5 EXCLUDE_FROM_ALL OBJECT ${DEP_MD5_SRC})
 
 list(APPEND TARGETS_DEP json md5)
-set(DEP_JSON $<TARGET_OBJECTS:json>)
+set(DEP_JSON)
 set(DEP_MD5)
 if(NOT CRYPTO_FOUND)
   set(DEP_MD5 $<TARGET_OBJECTS:md5>)
@@ -2203,6 +2203,7 @@
   ${WEBSOCKETS_LIBRARIES}
   ${ZLIB_LIBRARIES}
   ${PLATFORM_LIBS}
+  jsonparser
   # Add pthreads (on non-Windows) at the end, so that other libraries can depend
   # on it.
   ${CMAKE_THREAD_LIBS_INIT}
--- a/src/engine/client/client.cpp
+++ b/src/engine/client/client.cpp
@@ -8,7 +8,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>
--- a/src/engine/client/serverbrowser_http.cpp
+++ b/src/engine/client/serverbrowser_http.cpp
@@ -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>
--- a/src/engine/client/updater.cpp
+++ b/src/engine/client/updater.cpp
@@ -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>
--- a/src/engine/shared/http.cpp
+++ b/src/engine/shared/http.cpp
@@ -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>
--- a/src/engine/shared/json.h
+++ b/src/engine/shared/json.h
@@ -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);
--- a/src/engine/shared/serverinfo.cpp
+++ b/src/engine/shared/serverinfo.cpp
@@ -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>
 
--- a/src/test/serverinfo.cpp
+++ b/src/test/serverinfo.cpp
@@ -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)
 {
--- a/src/game/client/components/skins7.cpp
+++ b/src/game/client/components/skins7.cpp
@@ -5,7 +5,7 @@
 #include <base/math.h>
 #include <base/system.h>
 
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 #include <engine/gfx/image_manipulation.h>
 #include <engine/graphics.h>
 #include <engine/shared/config.h>
--- a/src/game/client/components/touch_controls.cpp
+++ b/src/game/client/components/touch_controls.cpp
@@ -4,7 +4,7 @@
 #include <base/system.h>
 
 #include <engine/client.h>
-#include <engine/external/json-parser/json.h>
+#include <json-parser/json.h>
 #include <engine/shared/config.h>
 #include <engine/shared/jsonwriter.h>
 #include <engine/shared/localization.h>
--- a/src/test/teehistorian.cpp
+++ b/src/test/teehistorian.cpp
@@ -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>