Shallow clones cause issues with `git push --recurse-submodules=check|on-demand`
such as in https://github.com/DFHack/dfhack/runs/3307192897?check_suite_focus=true:
```
The following submodule paths contain changes that can
not be found on any remote:
depends/luacov
Please try
git push --recurse-submodules=on-demand
or cd to the path and use
git push
to push them to a remote.
```
(in this case, the changes *are* on the remote, and on-demand doesn't help)
Our submodules also aren't currently very large on disk even with full clones -
libexpat is the largest:
616K .git/modules/depends/clsocket
744K .git/modules/depends/luacov
924K .git/modules/depends/xlsxio
1.8M .git/modules/depends/libzip
3.7M .git/modules/depends/jsoncpp
8.2M .git/modules/depends/libexpat
If a shallow clone of submodules is desired, `git clone --shallow-submodules` is
still an option.
Fixes behavior of `push.recurseSubmodules`: since the commit we track is
currently only a tag (v0.15.0), pushing with `recurseSubmodules = check` fails
since that checks that submodule commits are on a branch. In our own fork, we
can add a `dfhack` branch that resolves this issue, which is consistent with
other dependencies.
This makes jsoncpp a submodule that can be build directly from git
sources. This changes depends/jsoncpp to depends/jsoncpp-sub to avoid
filename conflict if someone tries to use git bisect.
jsoncpp library name changes to jsoncpp_lib_static.
jsoncpp version is the latest tagged release.
This will break existing clones when using git versions before 1.8.1, which do
not support the --name option of "git submodule add", unless steps are taken to
remove the old scripts submodules in .git/modules (see Compile.rst).
Repos need to include a CMakeLists.txt file with calls to the
DFHACK_SCRIPTS macro, which functions similarly to DFHACK_PLUGIN.
The `open-legends` script from lethosor/dfhack-scripts is included
as an example.