You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use json.hpp in my project and it must be compiled for the latest macOS and for Ubuntu 16.04 LTS. I use CMake for the project. For macOS I followed the guide and installed json via homebrew, so I have /usr/local/include/json.hpp. But Ubuntu 16.04 does not have nlohmann-json-dev in apt repository (only 16.10 and newer have). So, I decided to clone json and generate makefiles via CMake to install it. And I noticed that it is installed into /usr/local/include/nlohmann/json.hpp. So, now I have to solve the problem with different include paths using platform dependent conditions in CMake file that is not so convenient.
Maybe it would be better to change installation path in homebrew version and make it /usr/local/include/nlohmann/json.hpp too? As I see it is good practice to put includes in some subfolder. So, users may include it like this:
#include <nlohmann/json.hpp>
The text was updated successfully, but these errors were encountered:
I want to use json.hpp in my project and it must be compiled for the latest macOS and for Ubuntu 16.04 LTS. I use CMake for the project. For macOS I followed the guide and installed json via homebrew, so I have /usr/local/include/json.hpp. But Ubuntu 16.04 does not have nlohmann-json-dev in apt repository (only 16.10 and newer have). So, I decided to clone json and generate makefiles via CMake to install it. And I noticed that it is installed into /usr/local/include/nlohmann/json.hpp. So, now I have to solve the problem with different include paths using platform dependent conditions in CMake file that is not so convenient.
Maybe it would be better to change installation path in homebrew version and make it /usr/local/include/nlohmann/json.hpp too? As I see it is good practice to put includes in some subfolder. So, users may include it like this:
#include <nlohmann/json.hpp>
The text was updated successfully, but these errors were encountered: