From eac5a5b1dcc11a0fe2c2667dbeac235120ba5247 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Sun, 16 Oct 2022 21:10:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8submodule=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0jsoncpp=E6=BA=90=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 3 +++ .gitmodules_github | 3 +++ 3rdpart/CMakeLists.txt | 6 +++--- 3rdpart/jsoncpp | 1 + server/WebApi.h | 2 +- server/WebHook.h | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) create mode 160000 3rdpart/jsoncpp diff --git a/.gitmodules b/.gitmodules index 68b49644..7ef0bc71 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "3rdpart/media-server"] path = 3rdpart/media-server url = https://gitee.com/ireader/media-server +[submodule "3rdpart/jsoncpp"] + path = 3rdpart/jsoncpp + url = https://gitee.com/mirrors/jsoncpp.git \ No newline at end of file diff --git a/.gitmodules_github b/.gitmodules_github index 572aff62..ddd310e6 100644 --- a/.gitmodules_github +++ b/.gitmodules_github @@ -4,3 +4,6 @@ [submodule "3rdpart/media-server"] path = 3rdpart/media-server url = https://github.com/ireader/media-server +[submodule "3rdpart/jsoncpp"] + path = 3rdpart/jsoncpp + url = https://github.com/open-source-parsers/jsoncpp.git diff --git a/3rdpart/CMakeLists.txt b/3rdpart/CMakeLists.txt index ff5d3065..f489b1a8 100644 --- a/3rdpart/CMakeLists.txt +++ b/3rdpart/CMakeLists.txt @@ -24,15 +24,15 @@ ############################################################################## # jsoncpp -aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp JSONCPP_SRC_LIST) +aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp/src/lib_json JSONCPP_SRC_LIST) add_library(jsoncpp STATIC ${JSONCPP_SRC_LIST}) target_compile_options(jsoncpp PRIVATE ${COMPILE_OPTIONS_DEFAULT}) target_include_directories(jsoncpp PRIVATE - "$" + "$/jsoncpp/include" PUBLIC - "$") + "$/jsoncpp/include") update_cached_list(MK_LINK_LIBRARIES jsoncpp) diff --git a/3rdpart/jsoncpp b/3rdpart/jsoncpp new file mode 160000 index 00000000..8190e061 --- /dev/null +++ b/3rdpart/jsoncpp @@ -0,0 +1 @@ +Subproject commit 8190e061bc2d95da37479a638aa2c9e483e58ec6 diff --git a/server/WebApi.h b/server/WebApi.h index b4287c97..aaf0b19e 100755 --- a/server/WebApi.h +++ b/server/WebApi.h @@ -13,7 +13,7 @@ #include #include -#include "jsoncpp/json.h" +#include "json/json.h" #include "Common/Parser.h" #include "Network/Socket.h" #include "Http/HttpSession.h" diff --git a/server/WebHook.h b/server/WebHook.h index a1adc012..ea99f736 100755 --- a/server/WebHook.h +++ b/server/WebHook.h @@ -13,7 +13,7 @@ #include #include -#include "jsoncpp/json.h" +#include "json/json.h" //支持json或urlencoded方式传输参数 #define JSON_ARGS