From 7a28a0f056076e546e7e4ea958c6d969264b41bd Mon Sep 17 00:00:00 2001 From: Stonex <43725202+sheny1xuan@users.noreply.github.com> Date: Fri, 19 Nov 2021 01:15:32 +0800 Subject: [PATCH] fix: update json version to 3.10.1 (#169) Signed-off-by: stonex <1479765922@qq.com> --- cmake/modules/FindExtPackages.cmake | 2 +- cmake/modules/Findjson.cmake | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindExtPackages.cmake b/cmake/modules/FindExtPackages.cmake index a731cdcc..de40f02c 100644 --- a/cmake/modules/FindExtPackages.cmake +++ b/cmake/modules/FindExtPackages.cmake @@ -24,7 +24,7 @@ set(CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY ON CACHE BOOL ############################################################################### ### Packages and versions ### -find_package(json 3.7.3 REQUIRED) +find_package(json 3.10.1 REQUIRED) if(CASBIN_BUILD_TEST) # googletest diff --git a/cmake/modules/Findjson.cmake b/cmake/modules/Findjson.cmake index 74b48592..06afd7e4 100644 --- a/cmake/modules/Findjson.cmake +++ b/cmake/modules/Findjson.cmake @@ -16,9 +16,10 @@ include(FetchContent) FetchContent_Declare(json GIT_REPOSITORY https://github.com/nlohmann/json.git - GIT_TAG v3.7.3) + GIT_TAG v3.10.1) set(JSON_BuildTests OFF CACHE INTERNAL "") +set(JSON_Install ON) FetchContent_GetProperties(json) FetchContent_MakeAvailable(json)