Closed Hemlol19 closed 10 months ago
Figured this one out recently, the cmake build system pulls in https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent
but for msvc cmake there is a bug in that repo that breaks it,
you can replace line 27 of CMakeLists.txt to be this instead:
FetchContent_Declare(json GIT_REPOSITORY https://github.com/nlohmann/json GIT_TAG v3.11.2)
It worked, thank you so much! I will make a pr ^^
my CMake version is 3.26.4 i used visual studio code to compile the game, vs community 2019 amd64 configuring works just fine
here's the full error log
[cmake] CMake Error at CMakeLists.txt:150 (add_executable): [cmake] Cannot find source file: [cmake] [cmake] C:/Users/User/source/repos/V4Hero/build/_deps/json-src/nlohmann_json.natvis [cmake] [cmake] Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h [cmake] .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc [cmake] [cmake] [cmake] -- Generating done (2.7s) [cmake] CMake Generate step failed. Build files cannot be regenerated correctly. [proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -SC:/Users/User/source/repos/V4Hero -Bc:/Users/User/source/repos/V4Hero/build -G "Visual Studio 16 2019" -T host=x64 -A x64 exited with code: 1