From: Gianfranco Costamagna Date: Tue, 31 Jul 2018 10:26:22 +0000 (+0200) Subject: [PATCH] configure.ac: search for new json.hpp version 3 X-Git-Tag: archive/raspbian/3.1-1+rpi1^2^2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e3340f2edfd03b6f67bb9a522cac9a64e1ac7b6c;p=poedit.git [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 --- 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;