godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.66k stars 502 forks source link

Have syntax custom_gdnative=../godot-cpp #425

Open fire opened 4 years ago

fire commented 4 years ago

Describe the project you are working on:

Multiplayer 3d game

Describe the problem or limitation you are having in your project:

Using multiple gdnative libraries means each has a copy of godot-cpp. This causes problems with ensuring that they use the same version of godot-cpp.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

Add custom_gdnative or custom_godot_cpp scons option to the template. The name is arbitrary.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

The new scons option will do a search outside of the current repository.

If this enhancement will not be used often, can it be worked around with a few lines of script?:

Yes. A few lines of scons :D

Is there a reason why this should be core and not an add-on in the asset library?:

Build system things for gdnative aren't core.

Zylann commented 4 years ago

I still don't understand where would this be? Are you referring to something to write in your library's SCons files so they all use the same c++ bindings? Why does it means to change something the bindings themselves? (i.e an issue here)

fire commented 4 years ago

The idea is that the documentation recommends https://docs.godotengine.org/en/latest/_downloads/e1265441bc0bd0c8988e7647667eb187/SConstruct 's hard coded SConstruct. It would be helpful to update the hardcoded SConstruct to have support for the custom_gdnative=../somewhere_on_the_file_system syntax.

This is probably the wrong place to put this, but this is issue tracker for all things gdnative and C++.