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
Describe the bug
cmake find-package is not correctly finding the nlohmann_json package installed from vcpkg
Environment
OS: Windows 10
Compiler: Clang I think, on a Windows 10 machine x64
The Clang file was located here, I used VS + CMake:
C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
To Reproduce
Steps to reproduce the behavior:
Run vcpkg search nlohmann-json
Response: vcpkg-2019.07>vcpkg search nlohmann-json
1> CMake Error at ${PROJECT_SOURCE_DIR}\CMakeLists.txt:17 (find_package):
1> Could not find a configuration file for package "nlohmann_json" that is
1> compatible with requested version "3.7.0".
1>
1> The following configuration files were considered but not accepted:
1>
1> ${PROJECT_SOURCE_DIR}/../vcpkg-2019.07/packages/nlohmann-json_x86-windows/share/nlohmann_json/nlohmann_jsonConfig.cmake, version: 3.7.0 (32bit)
Hi @jelizaga3-gatech, you need to run .\vcpkg.exe integrate install and add -DCMAKE_TOOLCHAIN_FILE=YOUR_VCPKG_PATH/scripts/buildsystems/vcpkg.cmake to the cmake parameter.
No, it was a while ago but I remember that it kind of just fixed itself after I removed the find_package. And it somehow did link with it just the find_package was the thing that broke it for some reason.
Describe the bug
cmake find-package is not correctly finding the nlohmann_json package installed from vcpkg
Environment
The Clang file was located here, I used VS + CMake:
C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
To Reproduce
Steps to reproduce the behavior:
Run
vcpkg search nlohmann-json
Response:
vcpkg-2019.07>vcpkg search nlohmann-json
nlohmann-json 3.7.0 JSON for Modern C++
1a. Install vcpkg.
vcpkg.exe install nlohmann-json
vcpkg installs to
vcpkg-2019.07\packages\nlohmann-json_x86-windows
Use find_package in CMakeLists.txt in project
Expected behavior
CMake finds package.
Failure logs
Additional context
Link to release:
Released version 3.7.0 - https://github.com/nlohmann/json/tree/v3.7.0
Referenced here: nlohmann/json#1721 was told to create a ticket here.
The text was updated successfully, but these errors were encountered: