Skip to content

Commit 8950ae8

Browse files
bazfpSeb Horsewell
andauthored
Update jsoncpp version (#459)
* Add jsoncpp forked release * Update default.cmake * Update link targets for jsoncpp Co-authored-by: Seb Horsewell <seb.horsewell@seebyte.com>
1 parent 13826ae commit 8950ae8

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

cmake/configs/default.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ if(MSVC_VERSION LESS 1600)
340340
# for VS10 - version without support C++11
341341
hunter_default_version(jsoncpp VERSION 0.7.0)
342342
else()
343-
hunter_default_version(jsoncpp VERSION 1.8.0)
343+
hunter_default_version(jsoncpp VERSION 1.9.5-b1)
344344
endif()
345345

346346
hunter_default_version(kNet VERSION 2.7-p1)

cmake/projects/jsoncpp/hunter.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ include(hunter_cmake_args)
1111

1212
# List of versions:
1313

14+
hunter_add_version(
15+
PACKAGE_NAME
16+
jsoncpp
17+
VERSION
18+
"1.9.5-b1"
19+
URL
20+
"https://github.com/julianoes/jsoncpp/archive/refs/tags/1.9.5-b1.tar.gz"
21+
SHA1
22+
66cc807ea43907409842c1801ab7a43617cf2171
23+
)
24+
1425
hunter_add_version(
1526
PACKAGE_NAME
1627
jsoncpp

examples/jsoncpp/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@ add_executable(version main.cpp)
1515
if(${HUNTER_jsoncpp_VERSION} VERSION_LESS 1.0.0)
1616
target_link_libraries(version jsoncpp_lib)
1717
else()
18-
target_link_libraries(version jsoncpp_lib_static)
18+
if(${HUNTER_jsoncpp_VERSION} VERSION_LESS 1.9.5)
19+
target_link_libraries(version jsoncpp_lib_static)
20+
else()
21+
target_link_libraries(version JsonCpp::JsonCpp)
22+
endif()
1923
endif()

0 commit comments

Comments
 (0)