adepierre / Botcraft

Botcraft is a cross-platform C++ library to create bots that connect and interact with Minecraft servers with (optional) integrated OpenGL renderer
GNU General Public License v3.0
408 stars 44 forks source link

Compilation error with glfw #125

Open tomo0300 opened 9 months ago

tomo0300 commented 9 months ago

Hello, I have a problem with glfw3.

I have already tried to find something about it in the history, but without success. I got the following error message:

CMake Error: The source directory "C:/Users/User/Downloads/Botcraft/3rdparty/glfw" does not seem to contain CMakeLists.txt. Specify --help to use it, or press the help button in the CMake GUI.

Error: The cache could not be loaded

CMake error at cmake/glfw.cmake:35 (find_package): No package configuration file could be found that was requested by "glfw3" (requested version 3.3) with one of the following names:

glfw3Config.cmake
glfw3-config.cmake

Add the installation prefix of "glfw3" to CMAKE_PREFIX_PATH or set "glfw3_DIR" to a directory that contains one of the above files. If "glfw3" provides a separate development package or SDK, make sure that it is installed. is installed. Call stack (last call first): CMakeLists.txt:79 (include)

What can I do about this?

adepierre commented 9 months ago

Hello

It seems that something weird happened during the automatic installation process. Could you check if there is something in 3rdparty/glfw ? If the folder is empty, you can try to run the submodule command manually:

git submodule update --init -- 3rdparty/glfw

Then rerun the cmake config step. If it works it should populate 3rdparty/glfw and then compile it to /3rdparty/glfw during cmake config step.

Alternatively, if you don't specifically need GUI support you could just disable it, removing the dependency to glfw by setting BOTCRAFT_USE_OPENGL_GUI to OFF.

adepierre commented 9 months ago

Any news here, do you still have this issue?

tomo0300 commented 9 months ago

I'm relatively busy right now, can't find time to play Minecraft. As soon as I've tried it out, I'll let you know :)