When a project is consuming unity as as subproject, unity headers,
static library and pkg config files are installed by `meson install`.
This can be fixed by using `meson install --skip-subprojects`, but this
must be repeated in all the distros packaging a project.
Fixed by disabling install when building as a subproject.
Fixes: #661
1. Call the version extraction script directly instead
of through a Python returned from `find_program()`.
2. We don't need to use `meson.project_source_root()` as
`find_program()` will search relative to the current meson.build
script.
3. Lower the required version back to `>= 0.37.0`, and modify
some things to get rid of warnings with this version selected.
The use of `summary()`, `dict`, and positional arguments in
`pkgconfig.generate()` generate warnings with this version so
remove `summary()` and dict()`, also pass keyword arguments to
`pkgconfig.generate()`.
The following features from the CMake build have been implemented:
* Library version retrieved from unity.h.
* Extension support.
* Library, header, and package configuration file installation.
This commit is entirely based on existing work by Owen Torres.
1. Use cross-platform `/` operator for path construction.
2. Use `meson.project_source_root()` for correct path resolution of
generate_test_runner.rb path when used as a subproject.
3. Bump the minimum required Meson version to '0.56.0' as this is
needed for the above changes.
The main project doesn't really have any specific version requirement.
Specify a very low one just in case -- 0.37.0 is old enough to cover
probably any existing use of Meson anywhere in the wild, and
coincidentally is also the version that Meson started adding feature
warnings for, to notify you if you use too-new features.
The example *does* depend on a specific version. It needs 0.55.0 in
order to use subproject wrap dependency fallback instead of the legacy
style of specifying the name of the variable as a fallback. Ensure that
is used.
Cleaned up compiler flags in root meson.build, renamed a variable and removed 'c_std=<standard version>' because Meson sets C standard flag to C11 by default.