This creates a version scheme extracted from the existing git tagging
schema being used. It therefore relies on this schema not changing.
Since there appear no way to do all of this reading things from git
before the project() call we can sadly not use the correct version
in the project itself.
These actually switch on and off code, as opposed to the other HAVE
detction macros which only switch off header includes (and maybe
things would break if they're not there, but that's an existing bug
in netpgp). So we want to be sure that they are present when we
need them. This is what features are for.
This configures these features in delta-core as well.
Since we do not have access to the value of wrap-mode we can not
make the etpan dependency to behave correctly. Hack around it by
introducing a new option just for etpan.
Also swithc to the static-pic-lib scheme. The build_target() call
still does not work transparently for --default_library=both in case
of not a subproject, so there's not much to gain from it. Basically
meson does not support building monolith libraries very easily (no
one does afaik).
These now do all the dection rather than hardcoding things. It
also removes the dependency of bzip2 for the delta-core build,
bzip2 is now a feature and delta-core disables it.
- Require a minimum meson version, so we can tell people to use
--wrap-mode=forcefallback
- Rename the option "fat" to "monolith"
- Error when trying to build a monolith static library, that's a lot
of work since meson does not natively support this.
- Create a dependency for our main lib and use that in the
commandline. This fixes some duplication.
This can now create a few things:
- Build a shared lib linked against system libs
- Build a static lib linked against system libs
- Build a shared "fat" lib using internal deps
- Build a static lib using interal deps
The readme needs updating.
Using the system-libetpan causes pain to people who have out-dated
library versions, additionally it is nice to by default create a
library which uses dependencies as close as possible to the android
version for testing purposes. This makes sure that the bundeled
sub-projects are used by default.
Additionally it makes sure to not install these bundeled dependencies
and only statically link the libdeltachat.so against them. This is
beneficial to not conflict with any system-installed versions of these
libraries, especially since some bundled libraries are stripped down
and would not provide indirect users of the library the full library
functionality.
It does still provide an option to use the system-provided libetpan if
desired however, this makes sure libdeltachat plays nice with normal
package managers etc.
This was comparing a list with a string, which will start failing in
the future (as it should!). But there's simply no need for this,
declare_dependency() function is quite happy with an empty list for
argument. This was probably a leftover from an earlier attempt to get
things working.