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