pboettch / json-schema-validator

JSON schema validator for JSON for Modern C++
Other
463 stars 133 forks source link

CMake Error on exiting nlohmann_json #300

Closed Finkman closed 6 months ago

Finkman commented 6 months ago

I am using both, nlohmann_json and this validator. In my project, I use both as in-source library, so there is no need for the validator to fetch any source code from nlohmann json. But it always does. This happens, because I have no nlohmann json installed on my system.

[cmake] CMake Error at build/_deps/nlohmann_json-src/CMakeLists.txt:103 (add_library):
[cmake]   add_library cannot create target "nlohmann_json" because another target
[cmake]   with the same name already exists.  The existing target is an interface
[cmake]   library created in source directory

The fetching part of Cmake should check, if the target already exists.

Finkman commented 6 months ago

Sorry, haven't seen 0be4d4c