Use jsoncpp 1.8.4 as a submodule

This makes jsoncpp a submodule that can be build directly from git
sources. This changes depends/jsoncpp to depends/jsoncpp-sub to avoid
filename conflict if someone tries to use git bisect.

jsoncpp library name changes to jsoncpp_lib_static.

jsoncpp version is the latest tagged release.
develop
Pauli 2018-06-14 20:22:40 +03:00
parent ca744139f0
commit 2b79b4cce7
13 changed files with 14 additions and 7135 deletions

3
.gitmodules vendored

@ -13,3 +13,6 @@
[submodule "scripts2"]
path = scripts
url = ../../DFHack/scripts.git
[submodule "depends/jsoncpp"]
path = depends/jsoncpp-sub
url = https://github.com/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',

@ -348,7 +348,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

@ -365,7 +365,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 {

@ -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)
@ -137,7 +137,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"