[Jsoncpp] Update to 1.9.2 (#9759)

* Update jsoncpp 1.9.2

Using implicit int to float conversion is fixed from jsoncpp 1.9.2 version.

* Update Control

update jsoncpp 1.9.2

* remove deprecated function

include(vcpkg_common_functions)

* [jsoncpp] Allow disabling examples

Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
This commit is contained in:
etri 2020-01-30 04:49:19 +09:00 committed by GitHub
parent f272b0c984
commit 4a12817691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 14 deletions

View File

@ -1,4 +1,4 @@
Source: jsoncpp
Version: 1.9.1
Version: 1.9.2
Homepage: https://github.com/open-source-parsers/jsoncpp
Description: jsoncpp is an implementation of a JSON reader and writer in C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format that it is easy to parse and redeable for human.

View File

@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a7d3ef..4e06331 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,6 +82,7 @@ option(JSONCPP_WITH_WARNING_AS_ERROR "Force compilation to fail if a warning occ
option(JSONCPP_WITH_STRICT_ISO "Issue all the warnings demanded by strict ISO C and ISO C++" ON)
option(JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON)
option(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" ON)
+option(JSONCPP_WITH_EXAMPLE "Compile JsonCpp example" OFF)
option(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." OFF)
# Enable runtime search path support for dynamic libraries on OSX
@@ -228,4 +229,6 @@ add_subdirectory( src )
add_subdirectory( include )
#install the example
-add_subdirectory( example )
+if(JSONCPP_WITH_EXAMPLE)
+ add_subdirectory( example )
+endif()

View File

@ -1,28 +1,29 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO open-source-parsers/jsoncpp
REF 1.9.1
SHA512 4a8352e1d32c0ba8a0aea4df1663279cb2256b334643c5b62be37dfb5951e06900ba38c010d1201511fcf7de09137d6a4b886edbb2b99160d2f62b5f4679f766
REF 1.9.2
SHA512 7c7188199d62ae040d458d507ba62f0370c53f39c580760ee5485cae5c08e5ced0c9aea7c14f54dfd041999a7291e4d0f67f8ccd8b1030622c85590774688640
HEAD_REF master
PATCHES
allow-disable-examples.patch
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(JSONCPP_STATIC OFF)
set(JSONCPP_DYNAMIC ON)
else()
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(JSONCPP_STATIC ON)
set(JSONCPP_DYNAMIC OFF)
else()
set(JSONCPP_STATIC OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
DISABLE_PARALLEL_CONFIGURE
OPTIONS -DJSONCPP_WITH_CMAKE_PACKAGE:BOOL=ON
-DBUILD_STATIC_LIBS:BOOL=${JSONCPP_STATIC}
-DJSONCPP_WITH_PKGCONFIG_SUPPORT:BOOL=OFF
-DJSONCPP_WITH_TESTS:BOOL=OFF
OPTIONS
-DJSONCPP_WITH_CMAKE_PACKAGE=ON
-DBUILD_STATIC_LIBS=${JSONCPP_STATIC}
-DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF
-DJSONCPP_WITH_TESTS=OFF
-DJSONCPP_WITH_EXAMPLE=OFF
)
vcpkg_install_cmake()