(cmake) use FetchContent cmake module to retrieve jsoncpp third party dependency
This commit is contained in:
		@@ -256,7 +256,11 @@ if (USE_WS OR USE_TEST)
 | 
				
			|||||||
      GIT_REPOSITORY "https://github.com/gabime/spdlog"
 | 
					      GIT_REPOSITORY "https://github.com/gabime/spdlog"
 | 
				
			||||||
      GIT_TAG "v1.8.0") 
 | 
					      GIT_TAG "v1.8.0") 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  FetchContent_MakeAvailable(spdlog)
 | 
					  FetchContent_Declare(jsoncpp
 | 
				
			||||||
 | 
					      GIT_REPOSITORY "https://github.com/open-source-parsers/jsoncpp"
 | 
				
			||||||
 | 
					      GIT_TAG "1.9.4") 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  FetchContent_MakeAvailable(spdlog jsoncpp)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (USE_WS)
 | 
					  if (USE_WS)
 | 
				
			||||||
      add_subdirectory(ws)
 | 
					      add_subdirectory(ws)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,6 +2,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
All changes to this project will be documented in this file.
 | 
					All changes to this project will be documented in this file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## [10.4.6] - 2020-09-26
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(cmake) use FetchContent cmake module to retrieve jsoncpp third party dependency
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## [10.4.5] - 2020-09-26
 | 
					## [10.4.5] - 2020-09-26
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(cmake) use FetchContent cmake module to retrieve spdlog third party dependency
 | 
					(cmake) use FetchContent cmake module to retrieve spdlog third party dependency
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,11 +31,6 @@ add_library(ixbots STATIC
 | 
				
			|||||||
    ${IXBOTS_HEADERS}
 | 
					    ${IXBOTS_HEADERS}
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
find_package(JsonCpp)
 | 
					 | 
				
			||||||
if (NOT JSONCPP_FOUND)
 | 
					 | 
				
			||||||
  set(JSONCPP_INCLUDE_DIRS ../third_party/jsoncpp)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if (USE_PYTHON)
 | 
					if (USE_PYTHON)
 | 
				
			||||||
  target_compile_definitions(ixbots PUBLIC IXBOTS_USE_PYTHON)
 | 
					  target_compile_definitions(ixbots PUBLIC IXBOTS_USE_PYTHON)
 | 
				
			||||||
  find_package(Python COMPONENTS Development)
 | 
					  find_package(Python COMPONENTS Development)
 | 
				
			||||||
@@ -48,12 +43,11 @@ set(IXBOTS_INCLUDE_DIRS
 | 
				
			|||||||
    ../ixwebsocket
 | 
					    ../ixwebsocket
 | 
				
			||||||
    ../ixcobra
 | 
					    ../ixcobra
 | 
				
			||||||
    ../ixredis
 | 
					    ../ixredis
 | 
				
			||||||
    ../ixsentry
 | 
					    ../ixsentry)
 | 
				
			||||||
    ${JSONCPP_INCLUDE_DIRS}
 | 
					 | 
				
			||||||
    ${SPDLOG_INCLUDE_DIRS})
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (USE_PYTHON)
 | 
					if (USE_PYTHON)
 | 
				
			||||||
  set(IXBOTS_INCLUDE_DIRS ${IXBOTS_INCLUDE_DIRS} ${Python_INCLUDE_DIRS})
 | 
					  set(IXBOTS_INCLUDE_DIRS ${IXBOTS_INCLUDE_DIRS} ${Python_INCLUDE_DIRS})
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target_include_directories( ixbots PUBLIC ${IXBOTS_INCLUDE_DIRS} )
 | 
					target_include_directories( ixbots PUBLIC ${IXBOTS_INCLUDE_DIRS} )
 | 
				
			||||||
 | 
					target_link_libraries( ixbots jsoncpp_static )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,16 +22,11 @@ add_library(ixcobra STATIC
 | 
				
			|||||||
    ${IXCOBRA_HEADERS}
 | 
					    ${IXCOBRA_HEADERS}
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
find_package(JsonCpp)
 | 
					 | 
				
			||||||
if (NOT JSONCPP_FOUND)
 | 
					 | 
				
			||||||
  set(JSONCPP_INCLUDE_DIRS ../third_party/jsoncpp)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set(IXCOBRA_INCLUDE_DIRS
 | 
					set(IXCOBRA_INCLUDE_DIRS
 | 
				
			||||||
    .
 | 
					    .
 | 
				
			||||||
    ..
 | 
					    ..
 | 
				
			||||||
    ../ixcore
 | 
					    ../ixcore
 | 
				
			||||||
    ../ixcrypto
 | 
					    ../ixcrypto)
 | 
				
			||||||
    ${JSONCPP_INCLUDE_DIRS})
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
target_include_directories( ixcobra PUBLIC ${IXCOBRA_INCLUDE_DIRS} )
 | 
					target_include_directories( ixcobra PUBLIC ${IXCOBRA_INCLUDE_DIRS} )
 | 
				
			||||||
 | 
					target_link_libraries( ixcobra jsoncpp_static )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,15 +16,10 @@ add_library(ixsentry STATIC
 | 
				
			|||||||
  ${IXSENTRY_HEADERS}
 | 
					  ${IXSENTRY_HEADERS}
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
find_package(JsonCpp)
 | 
					 | 
				
			||||||
if (NOT JSONCPP_FOUND)
 | 
					 | 
				
			||||||
  set(JSONCPP_INCLUDE_DIRS ../third_party/jsoncpp)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set(IXSENTRY_INCLUDE_DIRS
 | 
					set(IXSENTRY_INCLUDE_DIRS
 | 
				
			||||||
    .
 | 
					    .
 | 
				
			||||||
    ..
 | 
					    ..
 | 
				
			||||||
    ../ixcore
 | 
					    ../ixcore)
 | 
				
			||||||
    ${JSONCPP_INCLUDE_DIRS})
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
target_include_directories( ixsentry PUBLIC ${IXSENTRY_INCLUDE_DIRS} )
 | 
					target_include_directories( ixsentry PUBLIC ${IXSENTRY_INCLUDE_DIRS} )
 | 
				
			||||||
 | 
					target_link_libraries( ixsentry jsoncpp_static )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,4 +6,4 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define IX_WEBSOCKET_VERSION "10.4.5"
 | 
					#define IX_WEBSOCKET_VERSION "10.4.6"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,18 +16,8 @@ include_directories(
 | 
				
			|||||||
  ../ws
 | 
					  ../ws
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
add_definitions(-DSPDLOG_COMPILED_LIB=1)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
find_package(JsonCpp)
 | 
					 | 
				
			||||||
if (NOT JSONCPP_FOUND)
 | 
					 | 
				
			||||||
  include_directories(../third_party/jsoncpp)
 | 
					 | 
				
			||||||
  set(JSONCPP_SOURCES ../third_party/jsoncpp/jsoncpp.cpp)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Shared sources
 | 
					# Shared sources
 | 
				
			||||||
set (SOURCES
 | 
					set (SOURCES
 | 
				
			||||||
  ${JSONCPP_SOURCES}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  test_runner.cpp
 | 
					  test_runner.cpp
 | 
				
			||||||
  IXTest.cpp
 | 
					  IXTest.cpp
 | 
				
			||||||
  ../third_party/msgpack11/msgpack11.cpp
 | 
					  ../third_party/msgpack11/msgpack11.cpp
 | 
				
			||||||
@@ -108,6 +98,7 @@ target_link_libraries(ixwebsocket_unittest ixcrypto)
 | 
				
			|||||||
target_link_libraries(ixwebsocket_unittest ixcore)
 | 
					target_link_libraries(ixwebsocket_unittest ixcore)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target_link_libraries(ixwebsocket_unittest spdlog)
 | 
					target_link_libraries(ixwebsocket_unittest spdlog)
 | 
				
			||||||
 | 
					target_link_libraries(ixwebsocket_unittest jsoncpp_static)
 | 
				
			||||||
if (USE_PYTHON)
 | 
					if (USE_PYTHON)
 | 
				
			||||||
  target_link_libraries(ixwebsocket_unittest ${Python_LIBRARIES})
 | 
					  target_link_libraries(ixwebsocket_unittest ${Python_LIBRARIES})
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										316
									
								
								third_party/jsoncpp/json/json-forwards.h
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										316
									
								
								third_party/jsoncpp/json/json-forwards.h
									
									
									
									
										vendored
									
									
								
							@@ -1,316 +0,0 @@
 | 
				
			|||||||
/// Json-cpp amalgamated forward header (http://jsoncpp.sourceforge.net/).
 | 
					 | 
				
			||||||
/// It is intended to be used with #include "json/json-forwards.h"
 | 
					 | 
				
			||||||
/// This header provides forward declaration for all JsonCpp types.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
// Beginning of content of file: LICENSE
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
The JsonCpp library's source code, including accompanying documentation,
 | 
					 | 
				
			||||||
tests and demonstration applications, are licensed under the following
 | 
					 | 
				
			||||||
conditions...
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
 | 
					 | 
				
			||||||
jurisdictions which recognize such a disclaimer. In such jurisdictions,
 | 
					 | 
				
			||||||
this software is released into the Public Domain.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
 | 
					 | 
				
			||||||
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and
 | 
					 | 
				
			||||||
The JsonCpp Authors, and is released under the terms of the MIT License (see below).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
In jurisdictions which recognize Public Domain property, the user of this
 | 
					 | 
				
			||||||
software may choose to accept it either as 1) Public Domain, 2) under the
 | 
					 | 
				
			||||||
conditions of the MIT License (see below), or 3) under the terms of dual
 | 
					 | 
				
			||||||
Public Domain/MIT License conditions described here, as they choose.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The MIT License is about as close to Public Domain as a license can get, and is
 | 
					 | 
				
			||||||
described in clear, concise terms at:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   http://en.wikipedia.org/wiki/MIT_License
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The full text of the MIT License follows:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
========================================================================
 | 
					 | 
				
			||||||
Copyright (c) 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Permission is hereby granted, free of charge, to any person
 | 
					 | 
				
			||||||
obtaining a copy of this software and associated documentation
 | 
					 | 
				
			||||||
files (the "Software"), to deal in the Software without
 | 
					 | 
				
			||||||
restriction, including without limitation the rights to use, copy,
 | 
					 | 
				
			||||||
modify, merge, publish, distribute, sublicense, and/or sell copies
 | 
					 | 
				
			||||||
of the Software, and to permit persons to whom the Software is
 | 
					 | 
				
			||||||
furnished to do so, subject to the following conditions:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The above copyright notice and this permission notice shall be
 | 
					 | 
				
			||||||
included in all copies or substantial portions of the Software.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 | 
					 | 
				
			||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 | 
					 | 
				
			||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 | 
					 | 
				
			||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 | 
					 | 
				
			||||||
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 | 
					 | 
				
			||||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 | 
					 | 
				
			||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 | 
					 | 
				
			||||||
SOFTWARE.
 | 
					 | 
				
			||||||
========================================================================
 | 
					 | 
				
			||||||
(END LICENSE TEXT)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The MIT license is compatible with both the GPL and commercial
 | 
					 | 
				
			||||||
software, affording one all of the rights of Public Domain with the
 | 
					 | 
				
			||||||
minor nuisance of being required to keep the above copyright notice
 | 
					 | 
				
			||||||
and license text in the source code. Note also that by accepting the
 | 
					 | 
				
			||||||
Public Domain "license" you can re-license your copy using whatever
 | 
					 | 
				
			||||||
license you like.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
// End of content of file: LICENSE
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef JSON_FORWARD_AMALGAMATED_H_INCLUDED
 | 
					 | 
				
			||||||
# define JSON_FORWARD_AMALGAMATED_H_INCLUDED
 | 
					 | 
				
			||||||
/// If defined, indicates that the source file is amalgamated
 | 
					 | 
				
			||||||
/// to prevent private header inclusion.
 | 
					 | 
				
			||||||
#define JSON_IS_AMALGAMATION
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
// Beginning of content of file: include/json/config.h
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
 | 
					 | 
				
			||||||
// Distributed under MIT license, or public domain if desired and
 | 
					 | 
				
			||||||
// recognized in your jurisdiction.
 | 
					 | 
				
			||||||
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef JSON_CONFIG_H_INCLUDED
 | 
					 | 
				
			||||||
#define JSON_CONFIG_H_INCLUDED
 | 
					 | 
				
			||||||
#include <cstddef>
 | 
					 | 
				
			||||||
#include <cstdint>
 | 
					 | 
				
			||||||
#include <istream>
 | 
					 | 
				
			||||||
#include <memory>
 | 
					 | 
				
			||||||
#include <ostream>
 | 
					 | 
				
			||||||
#include <sstream>
 | 
					 | 
				
			||||||
#include <string>
 | 
					 | 
				
			||||||
#include <type_traits>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// If non-zero, the library uses exceptions to report bad input instead of C
 | 
					 | 
				
			||||||
// assertion macros. The default is to use exceptions.
 | 
					 | 
				
			||||||
#ifndef JSON_USE_EXCEPTION
 | 
					 | 
				
			||||||
#define JSON_USE_EXCEPTION 1
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Temporary, tracked for removal with issue #982.
 | 
					 | 
				
			||||||
#ifndef JSON_USE_NULLREF
 | 
					 | 
				
			||||||
#define JSON_USE_NULLREF 1
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// If defined, indicates that the source file is amalgamated
 | 
					 | 
				
			||||||
/// to prevent private header inclusion.
 | 
					 | 
				
			||||||
/// Remarks: it is automatically defined in the generated amalgamated header.
 | 
					 | 
				
			||||||
// #define JSON_IS_AMALGAMATION
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Export macros for DLL visibility
 | 
					 | 
				
			||||||
#if defined(JSON_DLL_BUILD)
 | 
					 | 
				
			||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
 | 
					 | 
				
			||||||
#define JSON_API __declspec(dllexport)
 | 
					 | 
				
			||||||
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
 | 
					 | 
				
			||||||
#elif defined(__GNUC__) || defined(__clang__)
 | 
					 | 
				
			||||||
#define JSON_API __attribute__((visibility("default")))
 | 
					 | 
				
			||||||
#endif // if defined(_MSC_VER)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#elif defined(JSON_DLL)
 | 
					 | 
				
			||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
 | 
					 | 
				
			||||||
#define JSON_API __declspec(dllimport)
 | 
					 | 
				
			||||||
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
 | 
					 | 
				
			||||||
#endif // if defined(_MSC_VER)
 | 
					 | 
				
			||||||
#endif // ifdef JSON_DLL_BUILD
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if !defined(JSON_API)
 | 
					 | 
				
			||||||
#define JSON_API
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if defined(_MSC_VER) && _MSC_VER < 1800
 | 
					 | 
				
			||||||
#error                                                                         \
 | 
					 | 
				
			||||||
    "ERROR:  Visual Studio 12 (2013) with _MSC_VER=1800 is the oldest supported compiler with sufficient C++11 capabilities"
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if defined(_MSC_VER) && _MSC_VER < 1900
 | 
					 | 
				
			||||||
// As recommended at
 | 
					 | 
				
			||||||
// https://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010
 | 
					 | 
				
			||||||
extern JSON_API int msvc_pre1900_c99_snprintf(char* outBuf, size_t size,
 | 
					 | 
				
			||||||
                                              const char* format, ...);
 | 
					 | 
				
			||||||
#define jsoncpp_snprintf msvc_pre1900_c99_snprintf
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
#define jsoncpp_snprintf std::snprintf
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
 | 
					 | 
				
			||||||
// integer
 | 
					 | 
				
			||||||
// Storages, and 64 bits integer support is disabled.
 | 
					 | 
				
			||||||
// #define JSON_NO_INT64 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// JSONCPP_OVERRIDE is maintained for backwards compatibility of external tools.
 | 
					 | 
				
			||||||
// C++11 should be used directly in JSONCPP.
 | 
					 | 
				
			||||||
#define JSONCPP_OVERRIDE override
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if __cplusplus >= 201103L
 | 
					 | 
				
			||||||
#define JSONCPP_NOEXCEPT noexcept
 | 
					 | 
				
			||||||
#define JSONCPP_OP_EXPLICIT explicit
 | 
					 | 
				
			||||||
#elif defined(_MSC_VER) && _MSC_VER < 1900
 | 
					 | 
				
			||||||
#define JSONCPP_NOEXCEPT throw()
 | 
					 | 
				
			||||||
#define JSONCPP_OP_EXPLICIT explicit
 | 
					 | 
				
			||||||
#elif defined(_MSC_VER) && _MSC_VER >= 1900
 | 
					 | 
				
			||||||
#define JSONCPP_NOEXCEPT noexcept
 | 
					 | 
				
			||||||
#define JSONCPP_OP_EXPLICIT explicit
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
#define JSONCPP_NOEXCEPT throw()
 | 
					 | 
				
			||||||
#define JSONCPP_OP_EXPLICIT
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef __clang__
 | 
					 | 
				
			||||||
#if __has_extension(attribute_deprecated_with_message)
 | 
					 | 
				
			||||||
#define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message)))
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#elif defined(__GNUC__) // not clang (gcc comes later since clang emulates gcc)
 | 
					 | 
				
			||||||
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
 | 
					 | 
				
			||||||
#define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message)))
 | 
					 | 
				
			||||||
#elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
 | 
					 | 
				
			||||||
#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
 | 
					 | 
				
			||||||
#endif                  // GNUC version
 | 
					 | 
				
			||||||
#elif defined(_MSC_VER) // MSVC (after clang because clang on Windows emulates
 | 
					 | 
				
			||||||
                        // MSVC)
 | 
					 | 
				
			||||||
#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
 | 
					 | 
				
			||||||
#endif // __clang__ || __GNUC__ || _MSC_VER
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if !defined(JSONCPP_DEPRECATED)
 | 
					 | 
				
			||||||
#define JSONCPP_DEPRECATED(message)
 | 
					 | 
				
			||||||
#endif // if !defined(JSONCPP_DEPRECATED)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 6))
 | 
					 | 
				
			||||||
#define JSON_USE_INT64_DOUBLE_CONVERSION 1
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if !defined(JSON_IS_AMALGAMATION)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "allocator.h"
 | 
					 | 
				
			||||||
#include "version.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // if !defined(JSON_IS_AMALGAMATION)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Json {
 | 
					 | 
				
			||||||
using Int = int;
 | 
					 | 
				
			||||||
using UInt = unsigned int;
 | 
					 | 
				
			||||||
#if defined(JSON_NO_INT64)
 | 
					 | 
				
			||||||
using LargestInt = int;
 | 
					 | 
				
			||||||
using LargestUInt = unsigned int;
 | 
					 | 
				
			||||||
#undef JSON_HAS_INT64
 | 
					 | 
				
			||||||
#else                 // if defined(JSON_NO_INT64)
 | 
					 | 
				
			||||||
// For Microsoft Visual use specific types as long long is not supported
 | 
					 | 
				
			||||||
#if defined(_MSC_VER) // Microsoft Visual Studio
 | 
					 | 
				
			||||||
using Int64 = __int64;
 | 
					 | 
				
			||||||
using UInt64 = unsigned __int64;
 | 
					 | 
				
			||||||
#else                 // if defined(_MSC_VER) // Other platforms, use long long
 | 
					 | 
				
			||||||
using Int64 = int64_t;
 | 
					 | 
				
			||||||
using UInt64 = uint64_t;
 | 
					 | 
				
			||||||
#endif                // if defined(_MSC_VER)
 | 
					 | 
				
			||||||
using LargestInt = Int64;
 | 
					 | 
				
			||||||
using LargestUInt = UInt64;
 | 
					 | 
				
			||||||
#define JSON_HAS_INT64
 | 
					 | 
				
			||||||
#endif // if defined(JSON_NO_INT64)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
template <typename T>
 | 
					 | 
				
			||||||
using Allocator =
 | 
					 | 
				
			||||||
    typename std::conditional<JSONCPP_USING_SECURE_MEMORY, SecureAllocator<T>,
 | 
					 | 
				
			||||||
                              std::allocator<T>>::type;
 | 
					 | 
				
			||||||
using String = std::basic_string<char, std::char_traits<char>, Allocator<char>>;
 | 
					 | 
				
			||||||
using IStringStream =
 | 
					 | 
				
			||||||
    std::basic_istringstream<String::value_type, String::traits_type,
 | 
					 | 
				
			||||||
                             String::allocator_type>;
 | 
					 | 
				
			||||||
using OStringStream =
 | 
					 | 
				
			||||||
    std::basic_ostringstream<String::value_type, String::traits_type,
 | 
					 | 
				
			||||||
                             String::allocator_type>;
 | 
					 | 
				
			||||||
using IStream = std::istream;
 | 
					 | 
				
			||||||
using OStream = std::ostream;
 | 
					 | 
				
			||||||
} // namespace Json
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Legacy names (formerly macros).
 | 
					 | 
				
			||||||
using JSONCPP_STRING = Json::String;
 | 
					 | 
				
			||||||
using JSONCPP_ISTRINGSTREAM = Json::IStringStream;
 | 
					 | 
				
			||||||
using JSONCPP_OSTRINGSTREAM = Json::OStringStream;
 | 
					 | 
				
			||||||
using JSONCPP_ISTREAM = Json::IStream;
 | 
					 | 
				
			||||||
using JSONCPP_OSTREAM = Json::OStream;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // JSON_CONFIG_H_INCLUDED
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
// End of content of file: include/json/config.h
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
// Beginning of content of file: include/json/forwards.h
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
 | 
					 | 
				
			||||||
// Distributed under MIT license, or public domain if desired and
 | 
					 | 
				
			||||||
// recognized in your jurisdiction.
 | 
					 | 
				
			||||||
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef JSON_FORWARDS_H_INCLUDED
 | 
					 | 
				
			||||||
#define JSON_FORWARDS_H_INCLUDED
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if !defined(JSON_IS_AMALGAMATION)
 | 
					 | 
				
			||||||
#include "config.h"
 | 
					 | 
				
			||||||
#endif // if !defined(JSON_IS_AMALGAMATION)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Json {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// writer.h
 | 
					 | 
				
			||||||
class StreamWriter;
 | 
					 | 
				
			||||||
class StreamWriterBuilder;
 | 
					 | 
				
			||||||
class Writer;
 | 
					 | 
				
			||||||
class FastWriter;
 | 
					 | 
				
			||||||
class StyledWriter;
 | 
					 | 
				
			||||||
class StyledStreamWriter;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// reader.h
 | 
					 | 
				
			||||||
class Reader;
 | 
					 | 
				
			||||||
class CharReader;
 | 
					 | 
				
			||||||
class CharReaderBuilder;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// json_features.h
 | 
					 | 
				
			||||||
class Features;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// value.h
 | 
					 | 
				
			||||||
using ArrayIndex = unsigned int;
 | 
					 | 
				
			||||||
class StaticString;
 | 
					 | 
				
			||||||
class Path;
 | 
					 | 
				
			||||||
class PathArgument;
 | 
					 | 
				
			||||||
class Value;
 | 
					 | 
				
			||||||
class ValueIteratorBase;
 | 
					 | 
				
			||||||
class ValueIterator;
 | 
					 | 
				
			||||||
class ValueConstIterator;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
} // namespace Json
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // JSON_FORWARDS_H_INCLUDED
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
// End of content of file: include/json/forwards.h
 | 
					 | 
				
			||||||
// //////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif //ifndef JSON_FORWARD_AMALGAMATED_H_INCLUDED
 | 
					 | 
				
			||||||
							
								
								
									
										2354
									
								
								third_party/jsoncpp/json/json.h
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2354
									
								
								third_party/jsoncpp/json/json.h
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										5304
									
								
								third_party/jsoncpp/jsoncpp.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5304
									
								
								third_party/jsoncpp/jsoncpp.cpp
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -22,12 +22,6 @@ include_directories(ws .)
 | 
				
			|||||||
include_directories(ws ..)
 | 
					include_directories(ws ..)
 | 
				
			||||||
include_directories(ws ../third_party/cpp-linenoise)
 | 
					include_directories(ws ../third_party/cpp-linenoise)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
find_package(JsonCpp)
 | 
					 | 
				
			||||||
if (NOT JSONCPP_FOUND)
 | 
					 | 
				
			||||||
  include_directories(../third_party/jsoncpp)
 | 
					 | 
				
			||||||
  set(JSONCPP_SOURCES ../third_party/jsoncpp/jsoncpp.cpp)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if (USE_PYTHON)
 | 
					if (USE_PYTHON)
 | 
				
			||||||
  find_package(Python COMPONENTS Development)
 | 
					  find_package(Python COMPONENTS Development)
 | 
				
			||||||
  if (NOT Python_FOUND)
 | 
					  if (NOT Python_FOUND)
 | 
				
			||||||
@@ -56,13 +50,9 @@ target_link_libraries(ws ixcrypto)
 | 
				
			|||||||
target_link_libraries(ws ixcore)
 | 
					target_link_libraries(ws ixcore)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target_link_libraries(ws spdlog)
 | 
					target_link_libraries(ws spdlog)
 | 
				
			||||||
 | 
					target_link_libraries(ws jsoncpp_static)
 | 
				
			||||||
if (USE_PYTHON)
 | 
					if (USE_PYTHON)
 | 
				
			||||||
  target_link_libraries(ws ${Python_LIBRARIES})
 | 
					  target_link_libraries(ws ${Python_LIBRARIES})
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (JSONCPP_FOUND)
 | 
					 | 
				
			||||||
  target_include_directories(ws PUBLIC ${JSONCPP_INCLUDE_DIRS})
 | 
					 | 
				
			||||||
  target_link_libraries(ws ${JSONCPP_LIBRARIES})
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
install(TARGETS ws RUNTIME DESTINATION bin)
 | 
					install(TARGETS ws RUNTIME DESTINATION bin)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user