nmwsharp / polyscope

A C++ & Python viewer for 3D data like meshes and point clouds
https://polyscope.run
MIT License
1.76k stars 190 forks source link

Rename json->nlohmann for consistency with standard use of 3rd party lib #251

Closed phaedon closed 6 months ago

phaedon commented 7 months ago

Examples on the source repo README, for example https://github.com/nlohmann/json?tab=readme-ov-file#read-json-from-a-file use #include <nlohmann/json.hpp>

This is also in preparation for adding Bazel support (see https://github.com/phaedon/polyscope/tree/fs-bazel), which requires this pattern for including this json lib (via https://registry.bazel.build/modules/nlohmann_json rather than through a git submodule)

nmwsharp commented 6 months ago

Merged, thanks!

I was initially a little worried about this, because it could be a breaking change if someone is including our copy of nlohmann/json in their application code. But we mark it as a private dependency here https://github.com/nmwsharp/polyscope/blob/master/src/CMakeLists.txt#L337 so I think if anyone is including it regardless it's okay to change the path.