使用submodule方式添加jsoncpp源码

This commit is contained in:
ziyue 2022-10-16 21:10:18 +08:00
parent 8d80582f89
commit eac5a5b1dc
6 changed files with 12 additions and 5 deletions

3
.gitmodules vendored
View File

@ -4,3 +4,6 @@
[submodule "3rdpart/media-server"] [submodule "3rdpart/media-server"]
path = 3rdpart/media-server path = 3rdpart/media-server
url = https://gitee.com/ireader/media-server url = https://gitee.com/ireader/media-server
[submodule "3rdpart/jsoncpp"]
path = 3rdpart/jsoncpp
url = https://gitee.com/mirrors/jsoncpp.git

View File

@ -4,3 +4,6 @@
[submodule "3rdpart/media-server"] [submodule "3rdpart/media-server"]
path = 3rdpart/media-server path = 3rdpart/media-server
url = https://github.com/ireader/media-server url = https://github.com/ireader/media-server
[submodule "3rdpart/jsoncpp"]
path = 3rdpart/jsoncpp
url = https://github.com/open-source-parsers/jsoncpp.git

View File

@ -24,15 +24,15 @@
############################################################################## ##############################################################################
# jsoncpp # 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}) add_library(jsoncpp STATIC ${JSONCPP_SRC_LIST})
target_compile_options(jsoncpp target_compile_options(jsoncpp
PRIVATE ${COMPILE_OPTIONS_DEFAULT}) PRIVATE ${COMPILE_OPTIONS_DEFAULT})
target_include_directories(jsoncpp target_include_directories(jsoncpp
PRIVATE PRIVATE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/jsoncpp/include"
PUBLIC PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>") "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/jsoncpp/include")
update_cached_list(MK_LINK_LIBRARIES jsoncpp) update_cached_list(MK_LINK_LIBRARIES jsoncpp)

1
3rdpart/jsoncpp Submodule

@ -0,0 +1 @@
Subproject commit 8190e061bc2d95da37479a638aa2c9e483e58ec6

View File

@ -13,7 +13,7 @@
#include <string> #include <string>
#include <functional> #include <functional>
#include "jsoncpp/json.h" #include "json/json.h"
#include "Common/Parser.h" #include "Common/Parser.h"
#include "Network/Socket.h" #include "Network/Socket.h"
#include "Http/HttpSession.h" #include "Http/HttpSession.h"

View File

@ -13,7 +13,7 @@
#include <string> #include <string>
#include <functional> #include <functional>
#include "jsoncpp/json.h" #include "json/json.h"
//支持json或urlencoded方式传输参数 //支持json或urlencoded方式传输参数
#define JSON_ARGS #define JSON_ARGS