Until now, mixed targets was only about native build and so we were not
using a meson cross_config file and env var was enough.
But now we also to correctly set it in the cross_config file.
Instead of having the run_command function setting the
env from the buildEnv, this is the dependency that create the
env and then pass it to the run_command function.
This way, each dependency will be able to set a specific env.
This is needed for win32 on fedora.
It is better to use a specific pkg-config than setting a PKG_CONFIG_LIBDIR.
This avoid other CI (libzim/...) to set a env var specific to win32 build.
It seems that those libraries are not needed (anymore ?).
Even more, `msvcr100` makes `kiwix-serve` crash when printing messages
on stdout/stderr.
`msvcr100` lib is necessary for ICU, because the default mingw's `msvcr`
doesn't provide `_free_locale` and `_create_locale`.
Most recent versions of mingw fix this and we do not need them.
On debian (travis CI) we use a old version of mingw and we need to force
the use of `msvcr100`.
This is the big change !!!!
Instead of handling target as primary object and prepare/build targets,
we are handling build steps.
A build step may be a source (preparation) or a build (of the source).
Actualy, a step is a tuple (context, Builder or Source).
The context define the context of the step. It can be :
- 'source', for a Source step
- 'neutral' or the name of a platform for Build step.
Target becomes a "Class only" class.
Sometime the root_path is dependent of the target platform and sometime
not. But sometime dependent of the build arch :/
[TODO] We should move the cross_file generation to the PlatformInfo class.
Introduce also a "NeutralEnv", a build environment independent of the
targeted platform. All `Source` now build using the neutralEnv.
Most of toolchains are also using neutralEnv except android_ndk who is
specific to a platform.
As toolchain are neutral, platform specific environment variables are now
set by the platformInfo directly instead of the toolchain.