-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to locate nlohmann_jsonConfig.cmake #1755
Comments
Sorry, new to CMake; the "combined " method on the README makes a lot more sense |
|
do we need to install? |
? |
how to fix this issue ? when I use it in cmake , I find the same problem |
Yes, you need to install the package. |
Hi, I'm still a bit unclear on where to find
But don't really know what to make out of it, as I'm still quite new to software development. I would really appreciate any kind of help. |
https://json.nlohmann.me/integration/ Please start there and then come back with concrete questions if you have any. I've directed you to this part of the documentation before. |
@falbrechtskirchinger I have checked out the docs before, but couldn't make out what
is saying. Where should I look for the |
The build tree is the directory you invoked If you're inexperienced, there're easier options to integrate the library. For example, by just including the single-header |
Thanks @falbrechtskirchinger |
If you have any proposal how to improve documentation, please let me know. |
Hi @nlohmann ! I think something along the lines:
can be added. Basically, something like providing a description of build tree along with it, as like me many novice software developers might have a poor "software vocabulary" and might waste their time wondering and googling: "what is a build tree". Providing such a small description might prove to be convenient for them and might help with adding this new term to their dictionary. |
I suggest explicitly stating that find_package works only if In general, the CMake/External and CMake/Embedded sections are difficult to understand for newcomers.
I general, I would avoid using the word Embedded as in the context of C++ it is associated with development for embedded devices. The section has nothing to do with embedded devices, it is about setting up
I don't see how this helps. Normally, users should not be aware of package config files. As a further improvement, I would add some notes on installation.
Also, RPM, brew packages... (edit: corrected info about |
I've added the nlohmann/json as a submodule (default branch) to my repo at
external/json
. I then used this CMakeLists example to link to my shared library:I get this error while loading CMake:
However I see that
nlohmann_jsonConfig.cmake
exists atcmake-build-debug/external/json/nlohmann_jsonConfig.cmake
. I'm using the default CMake configurationin CLion 2019.2.2 (
debug
) that uses CMake 3.14.5 on macOS 10.14.6 (18G95). Isaddsubdirectory
is insufficient, or is there a bug somewhere else? I don't see a significant difference with the add subdirectory example.The text was updated successfully, but these errors were encountered: