From e3340f2edfd03b6f67bb9a522cac9a64e1ac7b6c Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 31 Jul 2018 12:26:22 +0200 Subject: [PATCH] [PATCH] configure.ac: search for new json.hpp version 3 Patch configure file to find the new json.hpp file location Gbp-Pq: Name new-json-hpp.patch --- configure.ac | 1 + src/json.h | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index aa6ac52..4fe8da6 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,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/src/json.h b/src/json.h index 633b655..66035da 100644 --- a/src/json.h +++ b/src/json.h @@ -29,9 +29,13 @@ #include "str_helpers.h" #ifdef HAVE_JSON_HPP -#include + #include #else -#include "../deps/json/src/json.hpp" + #ifdef HAVE_NLOHMANN_JSON_HPP + #include + #else + #include "../deps/json/src/json.hpp" + #endif #endif using json = nlohmann::json; -- 2.30.2