diff --git a/cmake/nlohmann-json.cmake b/cmake/nlohmann-json.cmake index 84f107b97c..d56a6cbb6d 100644 --- a/cmake/nlohmann-json.cmake +++ b/cmake/nlohmann-json.cmake @@ -33,6 +33,8 @@ find_package(nlohmann_json QUIET) set(nlohmann_json_clone FALSE) if(nlohmann_json_FOUND) message(STATUS "nlohmann::json dependency satisfied by: package") +elseif(TARGET nlohmann_json) + message(STATUS "nlohmann::json is already added as a CMake target!") elseif(EXISTS ${PROJECT_SOURCE_DIR}/.git AND EXISTS ${PROJECT_SOURCE_DIR}/third_party/nlohmann-json/CMakeLists.txt)