Merge remote-tracking branch 'suokko/jsoncpp_upgrade_to_submodule' into develop

develop
lethosor 2018-06-29 22:33:00 -04:00
commit 105ddd86d8
14 changed files with 21 additions and 7137 deletions

3
.gitmodules vendored

@ -13,3 +13,6 @@
[submodule "scripts2"]
path = scripts
url = ../../DFHack/scripts.git
[submodule "depends/jsoncpp"]
path = depends/jsoncpp-sub
url = ../../open-source-parsers/jsoncpp.git

@ -17,7 +17,7 @@ default_flags = [
'-I','depends/protobuf',
'-I','depends/lua/include',
'-I','depends/md5',
'-I','depends/jsoncpp',
'-I','depends/jsoncpp/include',
'-I','depends/tinyxml',
'-I','depends/tthread',
'-I','depends/clsocket/src',

@ -349,7 +349,6 @@ find_package(ZLIB REQUIRED)
include_directories(depends/protobuf)
include_directories(depends/lua/include)
include_directories(depends/md5)
include_directories(depends/jsoncpp)
# Support linking against external tinyxml
# If we find an external tinyxml, set the DFHACK_TINYXML variable to "tinyxml"

@ -9,7 +9,9 @@ if(NOT TinyXML_FOUND)
endif()
add_subdirectory(tthread)
add_subdirectory(jsoncpp)
OPTION(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" OFF)
OPTION(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" OFF)
add_subdirectory(jsoncpp-sub)
# build clsocket static and only as a dependency. Setting those options here overrides its own default settings.
OPTION(CLSOCKET_SHARED "Build clsocket lib as shared." OFF)
OPTION(CLSOCKET_DEP_ONLY "Build for use inside other CMake projects as dependency." ON)

@ -0,0 +1 @@
Subproject commit ddabf50f72cf369bf652a95c4d9fe31a1865a781

@ -1,2 +0,0 @@
PROJECT(jsoncpp)
ADD_LIBRARY(jsoncpp STATIC jsoncpp.cpp)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -44,6 +44,9 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- New functions:
- ``Units::isDiplomat(unit)``
## Internals
- jsoncpp: updated to version 1.8.4 and switched to using a git submodule
# 0.44.11-alpha1
## Structures

@ -366,7 +366,7 @@ IF(APPLE)
SET_TARGET_PROPERTIES(dfhack PROPERTIES SOVERSION 1.0.0)
ENDIF()
TARGET_LINK_LIBRARIES(dfhack protobuf-lite clsocket lua jsoncpp dfhack-version ${PROJECT_LIBS})
TARGET_LINK_LIBRARIES(dfhack protobuf-lite clsocket lua jsoncpp_lib_static dfhack-version ${PROJECT_LIBS})
SET_TARGET_PROPERTIES(dfhack PROPERTIES INTERFACE_LINK_LIBRARIES "")
TARGET_LINK_LIBRARIES(dfhack-client protobuf-lite clsocket)

@ -63,7 +63,7 @@ using namespace DFHack;
#include "tinythread.h"
using namespace tthread;
#include "jsoncpp.h"
#include "json/json.h"
using dfproto::CoreTextNotification;
using dfproto::CoreTextFragment;

@ -1,4 +1,4 @@
#include "jsoncpp.h"
#include "json/json.h"
#pragma once
namespace Json {
@ -24,8 +24,10 @@ namespace Json {
inline std::string toSimpleString (const Json::Value &val)
{
Json::FastWriter w;
return w.write(val);
StreamWriterBuilder builder;
builder["commentStyle"] = "None";
builder["indentation"] = "\t";
return writeString(builder, val);
}
}

@ -85,7 +85,7 @@ if (BUILD_SUPPORTED)
#DFHACK_PLUGIN(advtools advtools.cpp)
DFHACK_PLUGIN(autochop autochop.cpp)
DFHACK_PLUGIN(autodump autodump.cpp)
DFHACK_PLUGIN(autogems autogems.cpp LINK_LIBRARIES jsoncpp)
DFHACK_PLUGIN(autogems autogems.cpp LINK_LIBRARIES jsoncpp_lib_static)
DFHACK_PLUGIN(autohauler autohauler.cpp)
DFHACK_PLUGIN(autolabor autolabor.cpp)
DFHACK_PLUGIN(automaterial automaterial.cpp)
@ -138,7 +138,7 @@ if (BUILD_SUPPORTED)
DFHACK_PLUGIN(misery misery.cpp)
DFHACK_PLUGIN(mode mode.cpp)
DFHACK_PLUGIN(mousequery mousequery.cpp)
DFHACK_PLUGIN(orders orders.cpp LINK_LIBRARIES jsoncpp)
DFHACK_PLUGIN(orders orders.cpp LINK_LIBRARIES jsoncpp_lib_static)
DFHACK_PLUGIN(pathable pathable.cpp LINK_LIBRARIES lua)
DFHACK_PLUGIN(petcapRemover petcapRemover.cpp)
DFHACK_PLUGIN(plants plants.cpp)

@ -7,7 +7,7 @@
#include "modules/Filesystem.h"
#include "modules/Materials.h"
#include "jsoncpp.h"
#include "json/json.h"
#include "df/building.h"
#include "df/historical_figure.h"