From 2bea91e1dcb21591373d958cd65553d24dea0df7 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 31 Jul 2018 12:26:22 +0200 Subject: [PATCH] Update JSON for Modern C++ to version 3 * configure.ac: search for new json.hpp version 3 * update also json.hpp copy to v3.6.1 --- Makefile.am | 2 +- configure.ac | 2 +- deps/json | 2 +- src/json.h | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2b3d9f4c7a..c5692fa1d5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ dist_metainfo_DATA = net.poedit.Poedit.appdata.xml EXTRA_DIST = \ deps/json/LICENSE.MIT \ - deps/json/src/json.hpp \ + deps/json/single_include/nlohmann/json.hpp \ deps/pugixml/LICENSE.md \ deps/pugixml/src/pugiconfig.hpp \ deps/pugixml/src/pugixml.cpp \ diff --git a/configure.ac b/configure.ac index aa6ac5236e..4783d4117f 100644 --- a/configure.ac +++ b/configure.ac @@ -118,7 +118,7 @@ AS_IF([test "x$have_cpprest" = "xyes"], ]) AM_CONDITIONAL([HAVE_CPPREST], [test "x$have_cpprest" != "xno"]) -AC_CHECK_HEADERS([json.hpp]) +AC_CHECK_HEADERS([nlohmann/json.hpp]) WX_CONFIG_CHECK([3.0.3], [WXFOUND=1], [WXFOUND=0], [$WXLIBS_USED], [--unicode]) diff --git a/deps/json b/deps/json index 22b9a301d6..1126c9ca74 160000 --- a/deps/json +++ b/deps/json @@ -1 +1 @@ -Subproject commit 22b9a301d678383e545433e66a5d57eadddd2a76 +Subproject commit 1126c9ca74fdea22d2ce3a065ac0fcb5792cbdaf diff --git a/src/json.h b/src/json.h index 633b655437..d704fee9af 100644 --- a/src/json.h +++ b/src/json.h @@ -28,10 +28,10 @@ #include "str_helpers.h" -#ifdef HAVE_JSON_HPP -#include +#ifdef HAVE_NLOHMANN_JSON_HPP + #include #else -#include "../deps/json/src/json.hpp" + #include "../deps/json/single_include/nlohmann/json.hpp" #endif using json = nlohmann::json;