1.下载源代码
git clone https://github.com/nlohmann/json.git
2.创建build目录并编译:
cd json
mkdir build
cd build/
cmake ..
make
3.安装部署
make install
4.在 CMakefile.txt 中引用,如:
find_package(nlohmann_json 3.6.0 REQUIRED)
target_link_libraries(main.exe nlohmann_json::nlohmann_json)