godot-cpp
godot-cpp copied to clipboard
Ensure each header can be compiled on its own + reduced header dependencies
This makes sure an empty .cpp file with only the header as an include compiles correctly. Additionally it removes/updates/improves some includes.
e.g. previously this would not compile:
#include <godot_cpp/classes/object.hpp>
#include <godot_cpp/classes/wrapped.hpp>
class MyClass: public godot::Object
{
GDCLASS(MyClass, Object);
//...
as wrapped.hpp (or, more specifically, the expanded GDCLASS macro) requires a declaration of ClassDB.
Now the user of the library should be able to look up where a symbol is declared, include the header and use it.
If this is still desired, this needs a rebase. Also, we must ensure that these files stay in sync with their equivalents on the engine side, so please check if any of these changes should be applied to the engine first.