aboutsummaryrefslogtreecommitdiff
path: root/ports/jsoncpp
diff options
context:
space:
mode:
authoretri <etri3600@gmail.com>2020-01-30 04:49:19 +0900
committerGitHub <noreply@github.com>2020-01-29 11:49:19 -0800
commit4a128176915b10de4ff87c28faa3b419b0c8442b (patch)
treeb8af7dd9f6aa97d63af3ff704ede35bae7b82c9c /ports/jsoncpp
parentf272b0c9846d24c2b77a5fb60e1061d397384acb (diff)
downloadvcpkg-4a128176915b10de4ff87c28faa3b419b0c8442b.tar.gz
vcpkg-4a128176915b10de4ff87c28faa3b419b0c8442b.zip
[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>
Diffstat (limited to 'ports/jsoncpp')
-rw-r--r--ports/jsoncpp/CONTROL2
-rw-r--r--ports/jsoncpp/allow-disable-examples.patch20
-rw-r--r--ports/jsoncpp/portfile.cmake27
3 files changed, 35 insertions, 14 deletions
diff --git a/ports/jsoncpp/CONTROL b/ports/jsoncpp/CONTROL
index f0d4b66a3..fb5951d60 100644
--- a/ports/jsoncpp/CONTROL
+++ b/ports/jsoncpp/CONTROL
@@ -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.
diff --git a/ports/jsoncpp/allow-disable-examples.patch b/ports/jsoncpp/allow-disable-examples.patch
new file mode 100644
index 000000000..83413db90
--- /dev/null
+++ b/ports/jsoncpp/allow-disable-examples.patch
@@ -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()
diff --git a/ports/jsoncpp/portfile.cmake b/ports/jsoncpp/portfile.cmake
index 3e00476d2..3324ab985 100644
--- a/ports/jsoncpp/portfile.cmake
+++ b/ports/jsoncpp/portfile.cmake
@@ -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()