* meson.build: Use `meson.override_dependency`.

This is a new meson mechanism to avoid other projects to hard-code
the `freetype2_dep` variable name in their build definition.  It
also ensures that meson does not mix system and subproject versions
of FreeType inside of the same project.

Also remove outdated TODO because `declare_dependency` was already
there.
This commit is contained in:
Xavier Claessens 2020-10-26 11:31:19 -04:00 committed by Werner Lemberg
parent 5c81e09b17
commit 0565c5ba2b
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,15 @@
2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
* meson.build: Use `meson.override_dependency`.
This is a new meson mechanism to avoid other projects to hard-code
the `freetype2_dep` variable name in their build definition. It
also ensures that meson does not mix system and subproject versions
of FreeType inside of the same project.
Also remove outdated TODO because `declare_dependency` was already
there.
2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
* meson.build (bzip2_dep): Simplify.

View File

@ -334,6 +334,7 @@ freetype2_dep = declare_dependency(
include_directories: ft2_includes,
link_with: ft2_lib,
version: ft2_so_version)
meson.override_dependency('freetype2', freetype2_dep)
# NOTE: Using both `install_dir` and `subdir` doesn't seem to work below,
@ -347,8 +348,6 @@ install_headers(ft2_config_headers,
install_dir: 'include/freetype2/freetype/config')
# TODO(david): Declare_dependency() for using this in a Meson subproject
#
pkgconfig = import('pkgconfig')
pkgconfig.generate(ft2_lib,
filebase: 'freetype2',