Skip to content

Commit

Permalink
Fix if JSON library already added another CMake target (#2126)
Browse files Browse the repository at this point in the history
  • Loading branch information
cngzhnp authored May 3, 2023
1 parent 2fd3d35 commit 8c75041
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/nlohmann-json.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8c75041

Please sign in to comment.