The meson.build file of meson is not in the main directory.
We have to update kiwix-build to handle this.
For now, compile flatpak without zstd.
We will need to do a new build on flatpak with zstd soon.
We were assuming that meson project correspond to our projects and so we
were always building them, even if they were already compiled.
(This way, a simple `kiwix-build` is enough to recompile the WIP code of
our project).
However, on the CI, we do not archive the source code/build directory in
the base deps archive. So when we try to compile, the compile step of
meson projects fails because the source are not here.
We have a small workaround for pugixml but as zstd is also meson, it is
time to do something correct.
By default, all projects now try to skip if a build is already present.
Our projects are marked as `force_build` and so, they do not try to skip.
This will build all Make, CMake, QMake dependency being build with -O3.
So all our dependencies will be build with -O3.
Our project (meson) are already build in release when needed.
kiwix-desktop should be build optimized in case of release but we need
to handle it correctly. At least not build in O3 per default as it may
break debug.
We simply do a `git merge --ff-only` instead of a `git reset`. This way:
- No change on the local repository
=> update to `remote/master`
- If you switch branch and local branch is behind `remote/master`
=> fast forward to `remote/master`
- If you switch branch and branches diverge
=> No update of the directory
- On branch master (or a branch behind `origin/master`) with compatible
change in the working tree.
=> update of the directory
- On branch master (or a branch behind `origin/master`) but incompatible
change in the working tree.
=> No update.
This way, sources are keep up-to-date as far as possible.
If we modify the dependency's configure_env, we may change
the dictionary with value of the first platform. Then, when
we use it for the second platform, the previous values are used.
Do not modify the dep_conf_env dictionary and then we are good.
- We should not try to set the cross compilation flags when we use
gradle.
- Fix anyway the setting of tho cross compilation flags for android sdk
platform (the default implementation use the `static` attributes that
doesn't exist for android)
We need to set the property `needs_exe_wrapper` to true for
x86_64 cross compilation.
Else, meson will try to detect if we could run the cross
compiled executable, and because it is the same arch, it will
assume we can. So it will try to sanity check and execute the
cross compiled binary. Then fails.
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.