feat: add nlohmann/json lib (#1552)

* feat: add nlohmann/json lib

* remove build test off
This commit is contained in:
Aaron Kimbrell
2024-04-24 21:35:45 -05:00
committed by GitHub
parent 0367c67c85
commit 3801a97722
2 changed files with 22 additions and 1 deletions

20
cmake/FindJSON.cmake Normal file
View File

@@ -0,0 +1,20 @@
include(FetchContent)
message(STATUS "Fetching json...")
FetchContent_Declare(
json
GIT_REPOSITORY https://github.com/nlohmann/json
GIT_TAG v3.11.3
)
FetchContent_GetProperties(json)
if(NOT json_POPULATED)
FetchContent_Populate(json)
add_subdirectory(${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
FetchContent_MakeAvailable(json)
message(STATUS "json fetched and is now ready.")
set(JSON_FOUND TRUE)