summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-09-29 13:59:33 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2020-09-30 09:47:20 -0400
commitdad6d58450158a883a89c6442d5bc3b6d6f01ced (patch)
treef4d2b9e2507546d8d3a86e93eb797b4d6064ae76
parentbbdb6890f2c45a7f5353402fb723073d15227612 (diff)
downloadpango-dad6d58450158a883a89c6442d5bc3b6d6f01ced.tar.gz
meson: Use meson.override_dependency()
This allows projects that use pango as a subproject to not hardcode dependency variable names such as 'libpangocairo_dep'.
-rw-r--r--meson.build2
-rw-r--r--pango/meson.build5
2 files changed, 6 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 504b68b5..ed9dcc12 100644
--- a/meson.build
+++ b/meson.build
@@ -8,7 +8,7 @@ project('pango', 'c', 'cpp',
# https://github.com/mesonbuild/meson/issues/2289
'c_std=gnu99',
],
- meson_version : '>= 0.50.0')
+ meson_version : '>= 0.54.0')
add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', '-D_POSIX_THREAD_SAFE_FUNCTIONS', '-D_GNU_SOURCE', ], language: 'c')
diff --git a/pango/meson.build b/pango/meson.build
index 4c055f52..7fda16d7 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -151,6 +151,7 @@ libpango_dep = declare_dependency(
dependencies: pango_deps,
sources: pango_dep_sources,
)
+meson.override_dependency('pango', libpango_dep)
pango_pkg_requires = ['gobject-2.0']
if harfbuzz_dep.type_name() == 'pkgconfig'
@@ -292,6 +293,7 @@ if build_pangoft2
dependencies: pango_deps + [ libpango_dep ],
sources: pangoft2_dep_sources,
)
+ meson.override_dependency('pangoft2', libpangoft2_dep)
pkgconfig.generate(libpangoft2,
name: 'Pango FT2 and Pango Fc',
@@ -381,6 +383,7 @@ if xft_dep.found() and fontconfig_dep.found()
dependencies: pango_deps + [ libpango_dep, libpangoft2_dep ],
sources: pangoxft_dep_sources,
)
+ meson.override_dependency('pangoxft', libpangoxft_dep)
pkgconfig.generate(libpangoxft,
name: 'Pango Xft',
@@ -440,6 +443,7 @@ if host_system == 'windows'
include_directories: root_inc,
dependencies: pango_deps + [ libpango_dep ],
)
+ meson.override_dependency('pangowin32', libpangowin32_dep)
pkgconfig.generate(libpangowin32,
name: 'Pango Win32',
@@ -546,6 +550,7 @@ if cairo_dep.found()
dependencies: pango_deps + [ libpango_dep ],
sources: pangocairo_dep_sources,
)
+ meson.override_dependency('pangocairo', libpangocairo_dep)
# Create pangocairo.pc according to whether we found Cairo
# manually