nlohmann_json

Usage

since Hunter v0.19.52

hunter_add_package(nlohmann_json)
find_package(nlohmann_json CONFIG REQUIRED)
target_link_libraries(... nlohmann_json)

before Hunter v0.19.52

hunter_add_package(nlohmann-json)
find_package(nlohmann-json REQUIRED)
target_link_libraries(... nlohmann-json::nlohmann-json)

migration from V1.0.0 to V2.1.1

  • replace all nlohmann-json with nlohmann_json
  • add CONFIG to find_package(nlohmann_json CONFIG REQUIRED)
  • shorten target_link_libraries(), to target_link_libraries(... nlohmann_json) no nlohmann_json::nlohmann_json
  • change #include <json.hpp> to #include <nlohmann/json.hpp>