vorlac / godot-roguelite

Godot 4.2 GDExtension C++ game prototype
https://github.com/vorlac/godot-roguelite
MIT License
133 stars 9 forks source link

Linux error when building godot_engine #20

Open jkvargas opened 2 weeks ago

jkvargas commented 2 weeks ago

I did import the project with clion 2024.2.0.1 and linux (fedora 40 kde spin) and I tried to build godot_engine target and I am getting:

: note: this is the location of the previous definition In file included from /home/jhonny/dev/godot-roguelite/extern/godot-engine/core/math/geometry_2d.cpp:33: /home/jhonny/dev/godot-roguelite/extern/godot-engine/thirdparty/clipper2/include/clipper2/clipper.h:17:10: fatal error: clipper2/clipper.core.h: No such file or directory 17 | #include "clipper2/clipper.core.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~ can I ask some tips on how to fix the whole thing on my side? :)
vorlac commented 2 weeks ago

this is probably working as it should when it comes to the godot_engine target in cmake. the target created for the engine is really just a cmake library that should always get excluded from the build (the extension's target as well as the all target). That engine target only serves the purpose of making cmake aware of the engine sources so it can relay some of that info to visual studio / clion / vscode for better browsing and autocomplete/intellisense.

So all of this stuff is really just for better IDE support: https://github.com/vorlac/godot-roguelite/blob/main/cmake/godot-dev-configuration.cmake#L132-L207

However, the engine itself is still built "through" cmake, but calls scons to do it since the engine doesn't have any official cmake support (unlike godot-cpp). This part here is where scons is invoked if a build of the engine isn't detected in extern/godot/bin... https://github.com/vorlac/godot-roguelite/blob/main/cmake/godot-dev-configuration.cmake#L78-L124