Skip to content

Commit

Permalink
Update jsoncpp version (cpp-pm#459)
Browse files Browse the repository at this point in the history
* Add jsoncpp forked release

* Update default.cmake

* Update link targets for jsoncpp

Co-authored-by: Seb Horsewell <[email protected]>
  • Loading branch information
bazfp and Seb Horsewell authored Aug 9, 2021
1 parent 13826ae commit 8950ae8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ if(MSVC_VERSION LESS 1600)
# for VS10 - version without support C++11
hunter_default_version(jsoncpp VERSION 0.7.0)
else()
hunter_default_version(jsoncpp VERSION 1.8.0)
hunter_default_version(jsoncpp VERSION 1.9.5-b1)
endif()

hunter_default_version(kNet VERSION 2.7-p1)
Expand Down
11 changes: 11 additions & 0 deletions cmake/projects/jsoncpp/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ include(hunter_cmake_args)

# List of versions:

hunter_add_version(
PACKAGE_NAME
jsoncpp
VERSION
"1.9.5-b1"
URL
"https://github.com/julianoes/jsoncpp/archive/refs/tags/1.9.5-b1.tar.gz"
SHA1
66cc807ea43907409842c1801ab7a43617cf2171
)

hunter_add_version(
PACKAGE_NAME
jsoncpp
Expand Down
6 changes: 5 additions & 1 deletion examples/jsoncpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ add_executable(version main.cpp)
if(${HUNTER_jsoncpp_VERSION} VERSION_LESS 1.0.0)
target_link_libraries(version jsoncpp_lib)
else()
target_link_libraries(version jsoncpp_lib_static)
if(${HUNTER_jsoncpp_VERSION} VERSION_LESS 1.9.5)
target_link_libraries(version jsoncpp_lib_static)
else()
target_link_libraries(version JsonCpp::JsonCpp)
endif()
endif()

0 comments on commit 8950ae8

Please sign in to comment.