Closed yurivict closed 5 years ago
I'm trying to resolve this at the moment and I found that the best solution among those proposed by upstream is to use the external configuration files. However, when I'm trying that on Debian, it complains about the following:
Could not find a package configuration file provided by "nlohmann_json"
with any of the following names:
nlohmann_jsonConfig.cmake
nlohmann_json-config.cmake
Even though, I call cmake -DCMAKE_MODULE_PATH=/usr/lib/cmake
(which is where the files are installed according to my system), CMake still fails to configure. Therefore, I think there's a problem with the Debian package I have currently installed. You could try to build successfully using fixes from both #15 and #14 by visiting the nlohmann_json-test
branch as mentioned in #15.
I will confirm my hypothesis by manually installing the lib and comment on the result.
OK, so after playing a bit with this today, I have found that:
-DCMAKE_PREFIX_PATH=/usr/lib/cmake/
to cmake
call. In december, I was using the wrong option, therefore I wasn't getting a consistent result. I have since then reported the bug in the Debian BTS.2.1.1
) and that the CMake usage for nlohmann_json
seems to have changed since, then I'm using the 2.1.1
way for now. Therefore, I cannot guarantee that this works with 3.2.0
. Please, tell me if you manage to build with the version you're using if it is higher than 2.1.1
. I will confirm therefore be able to confirm the highest version number I can support.I have a fix in 7f648fc. It is now merged into master from #15 together with #14. Feel free to test this again and reopen the issue if it doesn't work with version 2.1.1
.
nlohmann-json
has cmake files, they should be used to detect its header location.FreeBSD 11.2 amd64