boku-ilen / geodot-plugin

Godot plugin for loading geospatial data
GNU General Public License v3.0
108 stars 18 forks source link

Godot uses SCsub files to build sub dependencies #43

Open clemens-tolboom opened 3 years ago

clemens-tolboom commented 3 years ago

In https://github.com/godotengine/godot/blob/master/SConstruct#L630 they use

    # Build subdirs, the build order is dependent on link order.
    SConscript("core/SCsub")

could we use?

# Build the extractor libraries
SConscript("src/raster-tile-extractor/SConstruct")
SConscript("src/vector-extractor/SConstruct")

and would that make the build cleaner?

See also https://scons.org/doc/production/HTML/scons-user.html#chap-hierarchical

clemens-tolboom commented 3 years ago

This would probably help with rebuilding from scratch using scons --clean

Oops

vector-extractor clemens$ scons --clean
scons: Reading SConscript files ...
No valid target platform selected.
kb173 commented 3 years ago

Good idea, I'll try that!

clemens-tolboom commented 3 years ago

Godot uses in core/SCsub which gave me an error while testing. The nice effect is the SCsub will become almost empty.

#!/usr/bin/env python

Import("env")

In https://discord.com/channels/571796279483564041/571796280146133047/803911823106506763 I asked about our build results ... we need 4! *.dynlibs .... why can't we build all into one file? I'm a C++ noob/learned it in 1992 :-p

kb173 commented 3 years ago

I've played around with it a bit, and I'm not 100% sure whether we really want to use that kind of SConscript() call. It does make hierarchical builds easier, but we also want the ability to build only one of the libraries (e.g. when testing new functionality in that part). The paths get mingled with this SConscript() call, which actually makes some things more difficult :/

Still, scons --clean would be quite practical, I'll see if there's another way for that.

clemens-tolboom commented 3 years ago

Not sure how your testing goes right now.

Is https://scons.org/doc/production/HTML/scons-user.html#chap-add-method pseudo builder which talks about def BuildTestProg to build for a particular Env which I read as a sub directory.

clemens-tolboom commented 3 years ago

If we align this with how Godot does adding Web, Android and iOS could be easier.

What do you think?

clemens-tolboom commented 3 years ago

Any idea?