aboutsummaryrefslogtreecommitdiff
path: root/ports/jsoncpp
diff options
context:
space:
mode:
authorMikhaylov Anton <anion155@gmail.com>2020-02-04 13:40:15 +0500
committerMikhaylov Anton <anion155@gmail.com>2020-02-04 13:40:15 +0500
commitd56ed7ee7613e969a3f304b3377438cc5a9064d4 (patch)
treed352eee837443f070bbf5d6c5fdd9a6f22f4f8c2 /ports/jsoncpp
parentab5b74c797f5a2bd6b28915908355e2b32876dfa (diff)
parent85bf9d9d792e379e973d66c8af9f39d65d1d6d42 (diff)
downloadvcpkg-d56ed7ee7613e969a3f304b3377438cc5a9064d4.tar.gz
vcpkg-d56ed7ee7613e969a3f304b3377438cc5a9064d4.zip
Merge branch 'master' into patch-1
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()