build: add support for conan and make vendored json optional

This commit is contained in:
Carlos Gomes Martinho 2020-02-24 10:29:57 +01:00
parent de69fd2133
commit 564e9f8d23
5 changed files with 50 additions and 7 deletions

View file

@ -1,7 +1,10 @@
#include <iostream>
#include <string>
#if defined( CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
#include "./json.hpp"
#else
#include "nlohmann/json.hpp"
#endif
using json = nlohmann::json;
void basic_json_test()

View file

@ -38,8 +38,11 @@ SOFTWARE.
#include "jwt/string_view.hpp"
#include "jwt/parameters.hpp"
#include "jwt/exceptions.hpp"
#if defined(CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
#include "jwt/json/json.hpp"
#else
#include "nlohmann/json.hpp"
#endif
// For convenience
using json_t = nlohmann::json;
using system_time_t = std::chrono::time_point<std::chrono::system_clock>;