cmake: make NLOHMANN_JSON_DIR a cache-variable for visibility

This commit is contained in:
Patrick Boettcher 2018-01-19 09:39:33 +01:00
parent b1b5cb891c
commit 990855cded

View File

@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.2)
# if used as a subdirectory just define a json-hpp-target as add_library(json-hpp INTERFACE)
# and associate the path to json.hpp via target_include_directories()
if(NOT TARGET json-hpp)
set(NLOHMANN_JSON_DIR "" CACHE STRING "path to json.hpp")
# find nlohmann's json.hpp
find_path(JSON_HPP json.hpp
PATHS