aboutsummaryrefslogtreecommitdiff
path: root/ports/jsoncpp
diff options
context:
space:
mode:
authorcodicodi <rob.ceglinski@gmail.com>2017-08-27 15:24:51 +0200
committercodicodi <rob.ceglinski@gmail.com>2017-08-27 15:24:51 +0200
commitc2efba65164fc29df4e9ad63e22f3ff29599cab0 (patch)
tree04c4e505d9d329bae668ec89d666378a3fc70dd8 /ports/jsoncpp
parent3a026cbe21881dc35278c2c7946b3b12b7815d09 (diff)
downloadvcpkg-c2efba65164fc29df4e9ad63e22f3ff29599cab0.tar.gz
vcpkg-c2efba65164fc29df4e9ad63e22f3ff29599cab0.zip
[jsoncpp] update to 1.8.1
Diffstat (limited to 'ports/jsoncpp')
-rw-r--r--ports/jsoncpp/CONTROL2
-rw-r--r--ports/jsoncpp/portfile.cmake30
2 files changed, 12 insertions, 20 deletions
diff --git a/ports/jsoncpp/CONTROL b/ports/jsoncpp/CONTROL
index d4ac63bd3..19f3e054a 100644
--- a/ports/jsoncpp/CONTROL
+++ b/ports/jsoncpp/CONTROL
@@ -1,3 +1,3 @@
Source: jsoncpp
-Version: 1.7.7
+Version: 1.8.1
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/portfile.cmake b/ports/jsoncpp/portfile.cmake
index f4b89adca..4f460fda7 100644
--- a/ports/jsoncpp/portfile.cmake
+++ b/ports/jsoncpp/portfile.cmake
@@ -1,11 +1,11 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/jsoncpp-1.7.7)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.zip"
- FILENAME "jsoncpp-1.7.7.zip"
- SHA512 3801faab0b1982bc41dac3049e0f7d24ea3dc759b77afc1ca7365b95a36460f87a74a0f5c6efd4c4a315ea2ca904b38f454b0a70133cda339c4a01ae8049cecb
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO open-source-parsers/jsoncpp
+ REF 1.8.1
+ SHA512 4203826fca4c366b51d28ffc928399c914ffaba8be1cada64ff118b5742e6b469d3fc3e59344587d851447857b479794c5697d4fd11a9a55b32a3a7a801b745b
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(JSONCPP_STATIC OFF)
@@ -17,29 +17,21 @@ endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
OPTIONS -DJSONCPP_WITH_CMAKE_PACKAGE:BOOL=ON
-DBUILD_STATIC_LIBS:BOOL=${JSONCPP_STATIC}
-DBUILD_SHARED_LIBS:BOOL=${JSONCPP_DYNAMIC}
+ -DJSONCPP_WITH_PKGCONFIG_SUPPORT:BOOL=OFF
+ -DJSONCPP_WITH_TESTS:BOOL=OFF
)
vcpkg_install_cmake()
# Fix CMake files
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
-file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/jsoncpp ${CURRENT_PACKAGES_DIR}/share/jsoncpp)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
-file(READ ${CURRENT_PACKAGES_DIR}/share/jsoncpp/jsoncppConfig.cmake _contents)
-string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n\n" "\n" _contents "${_contents}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/jsoncpp/jsoncppConfig.cmake ${_contents})
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/jsoncpp)
-file(READ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/jsoncpp/jsoncppConfig-debug.cmake _contents)
-string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" _contents "${_contents}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/jsoncpp/jsoncppConfig-debug.cmake "${_contents}")
-
-# Remove useless files in debug
+# Remove includes in debug
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsoncpp)