mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
Merge pull request #1302 from sehraf/pr_use_system_rapidjson
Add auto detection of installed rapidjson
This commit is contained in:
commit
61087d232a
@ -154,7 +154,11 @@
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#ifdef HAS_RAPIDJSON
|
||||
#include <rapidjson/document.h>
|
||||
#else
|
||||
#include <rapid_json/document.h>
|
||||
#endif // HAS_RAPIDJSON
|
||||
|
||||
#include "retroshare/rsflags.h"
|
||||
#include "serialiser/rsserial.h"
|
||||
|
@ -36,8 +36,11 @@
|
||||
#include <string>
|
||||
#include <typeinfo> // for typeid
|
||||
|
||||
#include <rapid_json/document.h>
|
||||
#ifdef HAS_RAPIDJSON
|
||||
#include <rapidjson/prettywriter.h>
|
||||
#else
|
||||
#include <rapid_json/prettywriter.h>
|
||||
#endif // HAS_RAPIDJSON
|
||||
|
||||
//static const uint32_t MAX_SERIALIZED_ARRAY_SIZE = 500 ;
|
||||
static const uint32_t MAX_SERIALIZED_CHUNK_SIZE = 10*1024*1024 ; // 10 MB.
|
||||
|
@ -35,7 +35,11 @@
|
||||
#include "serialiser/rsserializer.h"
|
||||
#include "serialiser/rsserializable.h"
|
||||
|
||||
#ifdef HAS_RAPIDJSON
|
||||
#include <rapidjson/document.h>
|
||||
#else
|
||||
#include <rapid_json/document.h>
|
||||
#endif // HAS_RAPIDJSON
|
||||
#include <typeinfo> // for typeid
|
||||
#include <type_traits>
|
||||
#include <errno.h>
|
||||
|
@ -16,7 +16,15 @@ bitdht {
|
||||
# when rapidjson is mainstream on all distribs, we will not need the sources
|
||||
# anymore in the meantime, they are part of the RS directory so that it is
|
||||
# always possible to find them
|
||||
INCLUDEPATH *= $$system_path($$clean_path($${PWD}/../../rapidjson-1.1.0))
|
||||
RAPIDJSON_AVAILABLE = $$system(pkg-config --atleast-version 1.1 RapidJSON && echo yes)
|
||||
isEmpty(RAPIDJSON_AVAILABLE) {
|
||||
message("using built-in rapidjson")
|
||||
INCLUDEPATH *= $$system_path($$clean_path($${PWD}/../../rapidjson-1.1.0))
|
||||
} else {
|
||||
message("using systems rapidjson")
|
||||
DEFINES *= HAS_RAPIDJSON
|
||||
}
|
||||
|
||||
|
||||
sLibs =
|
||||
mLibs = $$RS_SQL_LIB ssl crypto $$RS_THREAD_LIB $$RS_UPNP_LIB
|
||||
|
Loading…
Reference in New Issue
Block a user