From 6a445d2eef8dbb4edab9bf841fd6a3d64e0e1480 Mon Sep 17 00:00:00 2001 From: Zander Brown Date: Tue, 6 Jul 2021 19:03:10 +0100 Subject: [PATCH] build: Make exported package in gir consistent Additionally Cogl was missing xlib as an include Part-of: --- clutter/clutter/meson.build | 1 + cogl/cogl-pango/meson.build | 7 ++++--- cogl/cogl/meson.build | 22 +++++++++++++++------- src/meson.build | 2 +- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build index 9a14469b5..dd139c8c0 100644 --- a/clutter/clutter/meson.build +++ b/clutter/clutter/meson.build @@ -333,6 +333,7 @@ if have_introspection nsversion: libmutter_api_version, header: 'cally/cally.h', namespace: 'Cally', + export_packages: [libmutter_clutter_name], includes: [ libmutter_mtk_gir[0], libmutter_cogl_gir[0], diff --git a/cogl/cogl-pango/meson.build b/cogl/cogl-pango/meson.build index db5bb2e42..90775f4da 100644 --- a/cogl/cogl-pango/meson.build +++ b/cogl/cogl-pango/meson.build @@ -21,7 +21,8 @@ cogl_pango_deps = [ libmutter_cogl_dep, ] -libmutter_cogl_pango = shared_library('mutter-cogl-pango-' + libmutter_api_version, +libmutter_cogl_pango_name = 'mutter-cogl-pango-' + libmutter_api_version +libmutter_cogl_pango = shared_library(libmutter_cogl_pango_name, sources: [cogl_pango_sources, cogl_pango_public_headers], version: '0.0.0', soversion: 0, @@ -56,7 +57,7 @@ if have_introspection pango_dep, libmutter_cogl_pango_dep, ], - export_packages: 'mutter-cogl-pango-@0@'.format(libmutter_api_version), + export_packages: [libmutter_cogl_pango_name], extra_args: introspection_args + [ '-UCOGL_COMPILATION', '-DG_LOG_DOMAIN="CoglPango"', @@ -70,7 +71,7 @@ install_headers(cogl_pango_public_headers, subdir: cogl_pango_includesubdir) pkg.generate(libmutter_cogl_pango, name: 'CoglPango', - filebase: 'mutter-cogl-pango-' + libmutter_api_version, + filebase: libmutter_cogl_pango_name, description: 'A text rendering for Cogl in mutter', subdirs: pkgname / 'cogl', requires: [cogl_pkg_deps, libmutter_cogl_name, pango_dep, pangocairo_dep], diff --git a/cogl/cogl/meson.build b/cogl/cogl/meson.build index eb690efce..d1aa6ef1d 100644 --- a/cogl/cogl/meson.build +++ b/cogl/cogl/meson.build @@ -1,6 +1,18 @@ cogl_cogl_includesubdir = cogl_includesubdir / 'cogl' cogl_cogl_includedir = cogl_includedir / 'cogl' +cogl_gir_includes = [ + 'GL-1.0', + 'GObject-2.0', + 'Graphene-1.0', +] + +if have_introspection + cogl_gir_includes += [ + libmutter_mtk_gir[0], + ] +endif + cogl_deprecated_headers = [ 'deprecated/cogl-program.h', 'deprecated/cogl-shader.h', @@ -293,6 +305,7 @@ cogl_sources = [ ] if have_x11 + cogl_gir_includes += ['xlib-2.0'] cogl_nonintrospected_headers += [ 'cogl-xlib.h', 'winsys/cogl-texture-pixmap-x11.h', @@ -403,14 +416,9 @@ if have_introspection sources: cogl_introspected_headers, nsversion: libmutter_api_version, namespace: 'Cogl', - includes: [ - libmutter_mtk_gir[0], - 'GL-1.0', - 'GObject-2.0', - 'Graphene-1.0', - ], + export_packages: [libmutter_cogl_name], + includes: cogl_gir_includes, dependencies: [cogl_deps], - export_packages: 'mutter-cogl-@0@'.format(libmutter_api_version), extra_args: introspection_args + [ '-UCOGL_COMPILATION', '-D__COGL_H_INSIDE__', diff --git a/src/meson.build b/src/meson.build index 238445a7b..a8cf7e197 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1279,7 +1279,7 @@ if have_introspection libmutter_dep, mutter_deps, ], - export_packages: 'libmutter-@0@'.format(libmutter_api_version), + export_packages: ['libmutter-@0@'.format(libmutter_api_version)], extra_args: mutter_c_args + introspection_args, kwargs: introspection_common, )