icinga2/cmake/FindJSON.cmake
Michael Friedrich 724b34c6f2 Integrate nlohmann_json into CMake
Better integration into base/json.cpp

Signed-off-by: Alexander A. Klimov <alexander.klimov@icinga.com>
2019-03-18 15:07:50 +01:00

10 lines
273 B
CMake

FIND_PATH (JSON_INCLUDE json.hpp HINTS "${PROJECT_SOURCE_DIR}/third-party/nlohmann_json")
if (JSON_INCLUDE)
set(JSON_BuildTests OFF CACHE INTERNAL "")
message(STATUS "Found JSON: ${JSON_INCLUDE}" )
else ()
message(FATAL_ERROR "Unable to include json.hpp")
endif ()