diff --git a/CMakeLists.txt b/CMakeLists.txt index cb87ffc1..08e786bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,13 @@ set(NE_HAVE_SSL 1) add_subdirectory(deps) +find_package(RapidJSON QUIET) +if(${RapidJSON_FOUND}) + set(RAPIDJSON_INCLUDE_DIRS ${RapidJSON_INCLUDE_DIRS}) +else() + message(STATUS "Using bundled RapidJSON") + set(RAPIDJSON_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/libs) +endif() #libuuid if(NOT APPLE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 23632d7e..e7fd99d5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -84,6 +84,7 @@ set(DAVIX_SOURCES set(DAVIX_INTERNAL_INCLUDES ${OPENSSL_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} + ${RAPIDJSON_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/deps ${PROJECT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR} diff --git a/src/utils/davix_gcloud_utils.cpp b/src/utils/davix_gcloud_utils.cpp index 759bd4de..1430ac23 100644 --- a/src/utils/davix_gcloud_utils.cpp +++ b/src/utils/davix_gcloud_utils.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #define SSTR(message) static_cast(std::ostringstream().flush() << message).str()