From e42a66416309d5cd7ee4ceb7b19c62eb3126fea5 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 14 Feb 2020 13:55:19 +0100 Subject: [PATCH] fix cmake nlohmann path inclusion Use the CMake variable holding the nlohmann directory and not the json header. --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c809d7..514a4d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,15 +74,14 @@ else() # find nlohmann/json.hpp message(STATUS ${nlohmann_json_orignal_DIR}) - find_path(JSON_HPP nlohmann/json.hpp PATHS ${nlohmann_json_orignal_DIR}) - if(EXISTS ${JSON_HPP}/nlohmann/json.hpp) + if(EXISTS ${JSON_HPP}) message(STATUS "Found nlohmann/json.hpp in given path: ${JSON_HPP}") target_include_directories( nlohmann_json_schema_validator - PUBLIC $) + PUBLIC $) else() message(FATAL_ERROR "could not find nlohmann/json.hpp or any related cmake-target. Please set nlohmann_json_DIR.") endif()