mutter/mtk/mtk/meson.build
Carlos Garnacho 6bda46095a mtk: Add API for X11 errors
We currently have a bit of a disaster area wrt X11 error handling,
with all of Cogl/Clutter/Mutter offering implementations with different
expectations and different degrees of integration with other error
handlers.

It makes more sense to have a single X11 error handling implementation
that is used in all those places. Mtk seems like the reasonable place
to have this kind of general API, so adopt the more advanced code
at src/x11.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3230>
2023-09-02 09:52:54 +00:00

93 lines
1.9 KiB
Meson

mtk_mtk_includesubdir = mtk_includesubdir / 'mtk'
mtk_headers = [
'mtk.h',
'mtk-macros.h',
'mtk-rectangle.h',
]
mtk_sources = [
'mtk-rectangle.c',
]
if have_x11
mtk_sources += 'mtk-x11-errors.c'
mtk_headers += [
'mtk-x11-errors.h',
'mtk-x11.h',
]
endif
mtk_private_headers = [
]
libmutter_mtk_name = 'mutter-mtk-' + libmutter_api_version
libmutter_mtk = shared_library(libmutter_mtk_name,
sources: [
mtk_sources,
mtk_headers,
mtk_private_headers,
],
version: '0.0.0',
soversion: 0,
c_args: mtk_c_args,
include_directories: mtk_includes,
dependencies: [mtk_deps],
gnu_symbol_visibility: 'hidden',
install_rpath: pkglibdir,
install_dir: pkglibdir,
install: true,
)
libmutter_mtk_dep = declare_dependency(
link_with: libmutter_mtk,
dependencies: mtk_deps,
)
if have_introspection
mtk_introspection_args = introspection_args + [
'-DMTK_SYSCONFDIR="@0@"'.format(prefix / sysconfdir),
'-DMTK_COMPILATION=1',
'-DCOGL_DISABLE_DEPRECATION_WARNINGS',
'-DG_LOG_DOMAIN="Mtk"'
]
libmutter_mtk_gir = gnome.generate_gir(libmutter_mtk,
sources: [
mtk_sources,
mtk_headers,
],
nsversion: libmutter_api_version,
namespace: 'Mtk',
export_packages: [libmutter_mtk_name],
includes: [
'GObject-2.0',
'cairo-1.0',
'Graphene-1.0',
],
extra_args: mtk_introspection_args + ['--c-include=mtk/mtk.h'],
install_dir_gir: pkglibdir,
install_dir_typelib: pkglibdir,
install: true,
)
endif
install_headers(mtk_headers,
subdir: mtk_mtk_includesubdir)
pkg.generate(libmutter_mtk,
name: 'Mutter Toolkit',
filebase: libmutter_mtk_name,
description: 'Mutter Toolkit Private Library',
libraries: [m_dep],
subdirs: pkgname / 'mtk',
requires: [mtk_pkg_deps],
version: meson.project_version(),
variables: [
'apiversion=' + libmutter_api_version,
],
install_dir: pcdir,
)