use system libs for json and http-parser

This commit is contained in:
François Kooman 2017-03-18 12:51:30 +01:00
commit 477c36351b
No known key found for this signature in database
GPG key ID: 9C5EDD645A571EB2
7 changed files with 33 additions and 1 deletions

View file

@ -39,7 +39,11 @@
#include "../osdep/Thread.hpp"
#include "../osdep/BlockingQueue.hpp"
#ifdef ZT_USE_SYSTEM_JSON
#include <json.hpp>
#else
#include "../ext/json/json.hpp"
#endif
#include "JSONDB.hpp"

View file

@ -31,7 +31,13 @@
#include "../node/Constants.hpp"
#include "../node/Utils.hpp"
#ifdef ZT_USE_SYSTEM_JSON
#include <json.hpp>
#else
#include "../ext/json/json.hpp"
#endif
#include "../osdep/OSUtils.hpp"
namespace ZeroTier {

View file

@ -16,7 +16,13 @@ include objects.mk
# Use bundled http-parser since distribution versions are NOT API-stable or compatible!
# Trying to use dynamically linked libhttp-parser causes tons of compatibility problems.
OBJS+=ext/http-parser/http_parser.o
#OBJS+=ext/http-parser/http_parser.o
# Use system json
DEFS+=-DZT_USE_SYSTEM_JSON
# Use system http-parser
DEFS+=-DZT_USE_SYSTEM_HTTP_PARSER
LDLIBS+=-lhttp_parser
# Auto-detect miniupnpc and nat-pmp as well and use system libs if present,
# otherwise build into binary as done on Mac and Windows.

View file

@ -76,7 +76,11 @@
#include "service/OneService.hpp"
#ifdef ZT_USE_SYSTEM_JSON
#include <json.hpp>
#else
#include "ext/json/json.hpp"
#endif
#define ZT_PID_PATH "zerotier-one.pid"

View file

@ -45,7 +45,11 @@
#include <arpa/inet.h>
#endif
#ifdef ZT_USE_SYSTEM_JSON
#include <json.hpp>
#else
#include "../ext/json/json.hpp"
#endif
namespace ZeroTier {

View file

@ -73,7 +73,11 @@
#include "../ext/http-parser/http_parser.h"
#endif
#ifdef ZT_USE_SYSTEM_JSON
#include <json.hpp>
#else
#include "../ext/json/json.hpp"
#endif
using json = nlohmann::json;

View file

@ -32,7 +32,11 @@
#include "../node/Array.hpp"
#include "../node/Packet.hpp"
#ifdef ZT_USE_SYSTEM_JSON
#include <json.hpp>
#else
#include "../ext/json/json.hpp"
#endif
/**
* VERB_USER_MESSAGE type ID for software update messages