[mutter] Add meson build support
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Add meson build support
- Date: Tue, 6 Nov 2018 18:08:30 +0000 (UTC)
commit ef85d1a643dd153bb5681fc00f48ec550cd40aaa
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue May 22 15:55:35 2018 +0200
Add meson build support
This commit adds meson build support to mutter. It takes a step away
from the three separate code bases with three different autotools setups
into a single meson build system. There are still places that can be
unified better, for example by removing various "config.h" style files
from cogl and clutter, centralizing debug C flags and other configurable
macros, and similar artifacts that are there only because they were once
separate code bases.
There are some differences between the autotools setup and the new
meson. Here are a few:
The meson setup doesn't generate wrapper scripts for various cogl and
clutter test cases. What these tests did was more or less generate a
tiny script that called an executable with a test name as the argument.
To run particular tests, just run the test executable with the name of
the test as the argument.
The meson setup doesn't install test files anymore. The autotools test
suite was designed towards working with installed tests, but it didn't
really still, and now with meson, it doesn't install anything at all,
but instead makes sure that everything runs with the uninstalled input
files, binaries and libraries when running the test suite. Installable
tests may come later.
Tests from cogl, clutter and mutter are run on 'meson test'. In
autotools, only cogl and clutter tests were run on 'make check'.
.gitignore | 1 +
clutter/clutter/clutter-build-config.h.meson | 14 +
clutter/clutter/meson.build | 654 +++++++++++++++++
clutter/meson.build | 92 +++
clutter/tests/accessibility/meson.build | 38 +
clutter/tests/conform/meson.build | 84 +++
clutter/tests/interactive/meson.build | 103 +++
.../tests/interactive/meson/gen-test-unit-names.sh | 15 +
clutter/tests/meson.build | 5 +
clutter/tests/micro-bench/meson.build | 28 +
clutter/tests/performance/meson.build | 35 +
cogl/cogl-config.h.meson | 10 +
cogl/cogl-gles2/libmutter-cogl-gles2.map | 6 +
cogl/cogl-gles2/meson.build | 38 +
cogl/cogl-pango/libmutter-cogl-pango.map | 6 +
cogl/cogl-pango/meson.build | 74 ++
cogl/cogl-path/libmutter-cogl-path.map | 17 +
cogl/cogl-path/meson.build | 82 +++
cogl/cogl/cogl-defines.h.meson | 48 ++
cogl/cogl/libmutter-cogl.map | 51 ++
cogl/cogl/meson.build | 531 ++++++++++++++
cogl/meson.build | 116 +++
cogl/test-fixtures/meson.build | 22 +
cogl/tests/conform/meson.build | 106 +++
.../tests/conform/meson/find-conform-unit-tests.sh | 10 +
cogl/tests/meson.build | 14 +
cogl/tests/micro-perf/meson.build | 15 +
cogl/tests/unit/meson.build | 38 +
cogl/tests/unit/meson/find-unit-tests.sh | 6 +
config.h.meson | 65 ++
data/meson.build | 60 ++
doc/man/meson.build | 1 +
meson.build | 317 ++++++++
meson_options.txt | 142 ++++
po/meson.build | 1 +
src/compositor/plugins/meson.build | 20 +
src/meson.build | 815 +++++++++++++++++++++
src/meta/meson.build | 82 +++
src/tests/meson.build | 114 +++
39 files changed, 3876 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index f75f852f9..d68ead0e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -131,3 +131,4 @@ ltversion.m4
lt~obsolete.m4
.dirstamp
**/tags.*
+build/
diff --git a/clutter/clutter/clutter-build-config.h.meson b/clutter/clutter/clutter-build-config.h.meson
new file mode 100644
index 000000000..db77698c3
--- /dev/null
+++ b/clutter/clutter/clutter-build-config.h.meson
@@ -0,0 +1,14 @@
+/* Mutter version */
+#mesondefine MUTTER_VERSION
+
+/* List of Cogl drivers */
+#mesondefine CLUTTER_DRIVERS
+
+/* Have evdev support for input handling */
+#mesondefine HAVE_EVDEV
+
+/* Building with libwacom for advanced tablet management */
+#mesondefine HAVE_LIBWACOM
+
+/* Supports PangoFt2 */
+#mesondefine HAVE_PANGO_FT2
diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build
new file mode 100644
index 000000000..a37fce27e
--- /dev/null
+++ b/clutter/clutter/meson.build
@@ -0,0 +1,654 @@
+clutter_clutter_includedir = join_paths(clutter_includedir, 'clutter')
+
+clutter_headers = [
+ 'clutter.h',
+ 'clutter-action.h',
+ 'clutter-actor-meta.h',
+ 'clutter-actor.h',
+ 'clutter-align-constraint.h',
+ 'clutter-animatable.h',
+ 'clutter-autocleanups.h',
+ 'clutter-backend.h',
+ 'clutter-bind-constraint.h',
+ 'clutter-binding-pool.h',
+ 'clutter-bin-layout.h',
+ 'clutter-blur-effect.h',
+ 'clutter-box-layout.h',
+ 'clutter-brightness-contrast-effect.h',
+ 'clutter-cairo.h',
+ 'clutter-canvas.h',
+ 'clutter-child-meta.h',
+ 'clutter-click-action.h',
+ 'clutter-clone.h',
+ 'clutter-color-static.h',
+ 'clutter-color.h',
+ 'clutter-colorize-effect.h',
+ 'clutter-constraint.h',
+ 'clutter-container.h',
+ 'clutter-content.h',
+ 'clutter-deform-effect.h',
+ 'clutter-deprecated.h',
+ 'clutter-desaturate-effect.h',
+ 'clutter-device-manager.h',
+ 'clutter-drag-action.h',
+ 'clutter-drop-action.h',
+ 'clutter-effect.h',
+ 'clutter-enums.h',
+ 'clutter-event.h',
+ 'clutter-feature.h',
+ 'clutter-fixed-layout.h',
+ 'clutter-flow-layout.h',
+ 'clutter-gesture-action.h',
+ 'clutter-grid-layout.h',
+ 'clutter-group.h',
+ 'clutter-image.h',
+ 'clutter-input-device.h',
+ 'clutter-input-device-tool.h',
+ 'clutter-input-focus.h',
+ 'clutter-input-method.h',
+ 'clutter-interval.h',
+ 'clutter-keyframe-transition.h',
+ 'clutter-keysyms.h',
+ 'clutter-layout-manager.h',
+ 'clutter-layout-meta.h',
+ 'clutter-macros.h',
+ 'clutter-main.h',
+ 'clutter-mutter.h',
+ 'clutter-offscreen-effect.h',
+ 'clutter-page-turn-effect.h',
+ 'clutter-paint-nodes.h',
+ 'clutter-paint-node.h',
+ 'clutter-pan-action.h',
+ 'clutter-path-constraint.h',
+ 'clutter-path.h',
+ 'clutter-property-transition.h',
+ 'clutter-rotate-action.h',
+ 'clutter-script.h',
+ 'clutter-scriptable.h',
+ 'clutter-scroll-actor.h',
+ 'clutter-settings.h',
+ 'clutter-shader-effect.h',
+ 'clutter-shader-types.h',
+ 'clutter-swipe-action.h',
+ 'clutter-snap-constraint.h',
+ 'clutter-stage.h',
+ 'clutter-stage-manager.h',
+ 'clutter-tap-action.h',
+ 'clutter-test-utils.h',
+ 'clutter-texture.h',
+ 'clutter-text.h',
+ 'clutter-text-buffer.h',
+ 'clutter-timeline.h',
+ 'clutter-transition-group.h',
+ 'clutter-transition.h',
+ 'clutter-types.h',
+ 'clutter-units.h',
+ 'clutter-virtual-input-device.h',
+ 'clutter-zoom-action.h',
+]
+
+clutter_sources = [
+ 'clutter-action.c',
+ 'clutter-actor-box.c',
+ 'clutter-actor-meta.c',
+ 'clutter-actor.c',
+ 'clutter-align-constraint.c',
+ 'clutter-animatable.c',
+ 'clutter-backend.c',
+ 'clutter-base-types.c',
+ 'clutter-bezier.c',
+ 'clutter-bind-constraint.c',
+ 'clutter-binding-pool.c',
+ 'clutter-bin-layout.c',
+ 'clutter-blur-effect.c',
+ 'clutter-box-layout.c',
+ 'clutter-brightness-contrast-effect.c',
+ 'clutter-cairo.c',
+ 'clutter-canvas.c',
+ 'clutter-child-meta.c',
+ 'clutter-click-action.c',
+ 'clutter-clone.c',
+ 'clutter-color.c',
+ 'clutter-colorize-effect.c',
+ 'clutter-constraint.c',
+ 'clutter-container.c',
+ 'clutter-content.c',
+ 'clutter-deform-effect.c',
+ 'clutter-desaturate-effect.c',
+ 'clutter-device-manager.c',
+ 'clutter-drag-action.c',
+ 'clutter-drop-action.c',
+ 'clutter-effect.c',
+ 'clutter-event.c',
+ 'clutter-feature.c',
+ 'clutter-fixed-layout.c',
+ 'clutter-flatten-effect.c',
+ 'clutter-flow-layout.c',
+ 'clutter-gesture-action.c',
+ 'clutter-grid-layout.c',
+ 'clutter-image.c',
+ 'clutter-input-device.c',
+ 'clutter-input-device-tool.c',
+ 'clutter-input-focus.c',
+ 'clutter-input-method.c',
+ 'clutter-virtual-input-device.c',
+ 'clutter-interval.c',
+ 'clutter-keyframe-transition.c',
+ 'clutter-keysyms-table.c',
+ 'clutter-layout-manager.c',
+ 'clutter-layout-meta.c',
+ 'clutter-main.c',
+ 'clutter-master-clock.c',
+ 'clutter-master-clock-default.c',
+ 'clutter-offscreen-effect.c',
+ 'clutter-page-turn-effect.c',
+ 'clutter-paint-nodes.c',
+ 'clutter-paint-node.c',
+ 'clutter-pan-action.c',
+ 'clutter-path-constraint.c',
+ 'clutter-path.c',
+ 'clutter-property-transition.c',
+ 'clutter-rotate-action.c',
+ 'clutter-script.c',
+ 'clutter-script-parser.c',
+ 'clutter-scriptable.c',
+ 'clutter-scroll-actor.c',
+ 'clutter-settings.c',
+ 'clutter-shader-effect.c',
+ 'clutter-shader-types.c',
+ 'clutter-swipe-action.c',
+ 'clutter-snap-constraint.c',
+ 'clutter-stage.c',
+ 'clutter-stage-manager.c',
+ 'clutter-stage-window.c',
+ 'clutter-tap-action.c',
+ 'clutter-test-utils.c',
+ 'clutter-text.c',
+ 'clutter-text-buffer.c',
+ 'clutter-transition-group.c',
+ 'clutter-transition.c',
+ 'clutter-timeline.c',
+ 'clutter-units.c',
+ 'clutter-util.c',
+ 'clutter-paint-volume.c',
+ 'clutter-zoom-action.c',
+]
+
+clutter_private_headers = [
+ 'clutter-actor-meta-private.h',
+ 'clutter-actor-private.h',
+ 'clutter-backend-private.h',
+ 'clutter-bezier.h',
+ 'clutter-constraint-private.h',
+ 'clutter-content-private.h',
+ 'clutter-debug.h',
+ 'clutter-device-manager-private.h',
+ 'clutter-easing.h',
+ 'clutter-effect-private.h',
+ 'clutter-event-translator.h',
+ 'clutter-event-private.h',
+ 'clutter-flatten-effect.h',
+ 'clutter-gesture-action-private.h',
+ 'clutter-id-pool.h',
+ 'clutter-input-focus-private.h',
+ 'clutter-input-method-private.h',
+ 'clutter-master-clock.h',
+ 'clutter-master-clock-default.h',
+ 'clutter-offscreen-effect-private.h',
+ 'clutter-paint-node-private.h',
+ 'clutter-paint-volume-private.h',
+ 'clutter-private.h',
+ 'clutter-script-private.h',
+ 'clutter-settings-private.h',
+ 'clutter-stage-manager-private.h',
+ 'clutter-stage-private.h',
+ 'clutter-stage-view.h',
+ 'clutter-stage-window.h',
+]
+
+clutter_nonintrospected_sources = [
+ 'clutter-easing.c',
+ 'clutter-event-translator.c',
+ 'clutter-id-pool.c',
+ 'clutter-stage-view.c',
+]
+
+clutter_deprecated_headers = [
+ 'deprecated/clutter-actor.h',
+ 'deprecated/clutter-alpha.h',
+ 'deprecated/clutter-animatable.h',
+ 'deprecated/clutter-animation.h',
+ 'deprecated/clutter-animator.h',
+ 'deprecated/clutter-backend.h',
+ 'deprecated/clutter-behaviour.h',
+ 'deprecated/clutter-behaviour-depth.h',
+ 'deprecated/clutter-behaviour-ellipse.h',
+ 'deprecated/clutter-behaviour-opacity.h',
+ 'deprecated/clutter-behaviour-path.h',
+ 'deprecated/clutter-behaviour-rotate.h',
+ 'deprecated/clutter-behaviour-scale.h',
+ 'deprecated/clutter-bin-layout.h',
+ 'deprecated/clutter-box.h',
+ 'deprecated/clutter-cairo-texture.h',
+ 'deprecated/clutter-container.h',
+ 'deprecated/clutter-frame-source.h',
+ 'deprecated/clutter-group.h',
+ 'deprecated/clutter-input-device.h',
+ 'deprecated/clutter-keysyms.h',
+ 'deprecated/clutter-list-model.h',
+ 'deprecated/clutter-main.h',
+ 'deprecated/clutter-media.h',
+ 'deprecated/clutter-model.h',
+ 'deprecated/clutter-rectangle.h',
+ 'deprecated/clutter-score.h',
+ 'deprecated/clutter-shader.h',
+ 'deprecated/clutter-stage-manager.h',
+ 'deprecated/clutter-stage.h',
+ 'deprecated/clutter-state.h',
+ 'deprecated/clutter-table-layout.h',
+ 'deprecated/clutter-texture.h',
+ 'deprecated/clutter-timeline.h',
+ 'deprecated/clutter-timeout-pool.h',
+ 'deprecated/clutter-util.h',
+]
+
+clutter_deprecated_sources = [
+ 'deprecated/clutter-actor-deprecated.c',
+ 'deprecated/clutter-alpha.c',
+ 'deprecated/clutter-animation.c',
+ 'deprecated/clutter-animator.c',
+ 'deprecated/clutter-behaviour.c',
+ 'deprecated/clutter-behaviour-depth.c',
+ 'deprecated/clutter-behaviour-ellipse.c',
+ 'deprecated/clutter-behaviour-opacity.c',
+ 'deprecated/clutter-behaviour-path.c',
+ 'deprecated/clutter-behaviour-rotate.c',
+ 'deprecated/clutter-behaviour-scale.c',
+ 'deprecated/clutter-box.c',
+ 'deprecated/clutter-cairo-texture.c',
+ 'deprecated/clutter-frame-source.c',
+ 'deprecated/clutter-group.c',
+ 'deprecated/clutter-input-device-deprecated.c',
+ 'deprecated/clutter-layout-manager-deprecated.c',
+ 'deprecated/clutter-list-model.c',
+ 'deprecated/clutter-media.c',
+ 'deprecated/clutter-model.c',
+ 'deprecated/clutter-rectangle.c',
+ 'deprecated/clutter-score.c',
+ 'deprecated/clutter-shader.c',
+ 'deprecated/clutter-state.c',
+ 'deprecated/clutter-table-layout.c',
+ 'deprecated/clutter-texture.c',
+ 'deprecated/clutter-timeout-pool.c',
+]
+
+clutter_deprecated_private_headers = [
+ 'deprecated/clutter-model-private.h',
+ 'deprecated/clutter-timeout-interval.h',
+]
+
+clutter_deprecated_nonintrospected_sources = [
+ 'deprecated/clutter-timeout-interval.c',
+]
+
+clutter_backend_sources = []
+clutter_backend_nonintrospected_sources = [
+ 'cogl/clutter-stage-cogl.c',
+]
+clutter_backend_headers = []
+clutter_backend_private_headers = [
+ 'cogl/clutter-stage-cogl.h',
+]
+
+if have_x11
+ clutter_x11_sources = [
+ 'x11/clutter-backend-x11.c',
+ 'x11/clutter-device-manager-core-x11.c',
+ 'x11/clutter-device-manager-xi2.c',
+ 'x11/clutter-event-x11.c',
+ 'x11/clutter-input-device-core-x11.c',
+ 'x11/clutter-input-device-tool-xi2.c',
+ 'x11/clutter-input-device-xi2.c',
+ 'x11/clutter-keymap-x11.c',
+ 'x11/clutter-stage-x11.c',
+ 'x11/clutter-virtual-input-device-x11.c',
+ 'x11/clutter-x11-texture-pixmap.c',
+ ]
+ clutter_backend_sources += clutter_x11_sources
+
+ clutter_x11_nonintrospected_sources = [
+ 'x11/clutter-xkb-a11y-x11.c',
+ ]
+ clutter_backend_nonintrospected_sources += clutter_x11_nonintrospected_sources
+
+ clutter_x11_headers = [
+ 'x11/clutter-x11.h',
+ 'x11/clutter-x11-texture-pixmap.h',
+ ]
+ clutter_backend_headers += clutter_x11_headers
+
+ clutter_x11_private_headers = [
+ 'x11/clutter-backend-x11.h',
+ 'x11/clutter-device-manager-core-x11.h',
+ 'x11/clutter-device-manager-xi2.h',
+ 'x11/clutter-input-device-core-x11.h',
+ 'x11/clutter-input-device-tool-xi2.h',
+ 'x11/clutter-input-device-xi2.h',
+ 'x11/clutter-keymap-x11.h',
+ 'x11/clutter-settings-x11.h',
+ 'x11/clutter-stage-x11.h',
+ 'x11/clutter-virtual-input-device-x11.h',
+ 'x11/clutter-xkb-a11y-x11.h',
+ ]
+ clutter_backend_private_headers += clutter_x11_private_headers
+
+ clutter_x11_nonintrospected_sources = [
+ 'x11/xsettings/xsettings-client.c',
+ 'x11/xsettings/xsettings-client.h',
+ 'x11/xsettings/xsettings-common.c',
+ 'x11/xsettings/xsettings-common.h',
+ ]
+ clutter_backend_nonintrospected_sources += clutter_x11_nonintrospected_sources
+endif
+
+if have_native_backend
+ clutter_native_nonintrospected_sources = [
+ 'egl/clutter-backend-eglnative.c',
+ 'evdev/clutter-device-manager-evdev.c',
+ 'evdev/clutter-event-evdev.c',
+ 'evdev/clutter-input-device-evdev.c',
+ 'evdev/clutter-input-device-tool-evdev.c',
+ 'evdev/clutter-seat-evdev.c',
+ 'evdev/clutter-virtual-input-device-evdev.c',
+ 'evdev/clutter-xkb-utils.c',
+ ]
+ clutter_backend_nonintrospected_sources += clutter_native_nonintrospected_sources
+
+ clutter_native_private_headers = [
+ 'evdev/clutter-evdev.h',
+ 'evdev/clutter-device-manager-evdev.h',
+ 'evdev/clutter-input-device-evdev.h',
+ 'evdev/clutter-input-device-tool-evdev.h',
+ 'evdev/clutter-seat-evdev.h',
+ 'evdev/clutter-virtual-input-device-evdev.h',
+ 'evdev/clutter-xkb-utils.h',
+ ]
+ clutter_backend_private_headers += clutter_native_private_headers
+endif
+
+if have_wayland
+ clutter_wayland_nonintrospected_sources = [
+ 'wayland/clutter-wayland-surface.c',
+ ]
+ clutter_backend_nonintrospected_sources += clutter_wayland_nonintrospected_sources
+
+ clutter_wayland_private_headers = [
+ 'wayland/clutter-wayland-compositor.h',
+ 'wayland/clutter-wayland-surface.h',
+ ]
+ clutter_backend_private_headers += clutter_wayland_private_headers
+endif
+
+cally_headers = [
+ 'cally/cally-actor.h',
+ 'cally/cally-clone.h',
+ 'cally/cally-factory.h',
+ 'cally/cally-group.h',
+ 'cally/cally.h',
+ 'cally/cally-main.h',
+ 'cally/cally-rectangle.h',
+ 'cally/cally-root.h',
+ 'cally/cally-stage.h',
+ 'cally/cally-text.h',
+ 'cally/cally-texture.h',
+ 'cally/cally-util.h',
+]
+
+cally_sources = [
+ 'cally/cally-actor.c',
+ 'cally/cally.c',
+ 'cally/cally-clone.c',
+ 'cally/cally-group.c',
+ 'cally/cally-rectangle.c',
+ 'cally/cally-root.c',
+ 'cally/cally-stage.c',
+ 'cally/cally-text.c',
+ 'cally/cally-texture.c',
+ 'cally/cally-util.c',
+]
+
+cally_private_headers = [
+ 'cally/cally-actor-private.h',
+]
+
+clutter_built_sources = []
+clutter_built_headers = []
+clutter_built_private_headers = []
+
+cdata = configuration_data()
+cdata.set_quoted('MUTTER_VERSION', meson.project_version())
+cdata.set('CLUTTER_DRIVERS', '"*"')
+cdata.set('HAVE_EVDEV', have_native_backend)
+cdata.set('HAVE_LIBWACOM', have_libwacom)
+cdata.set('HAVE_PANGO_FT2', have_pango_ft2)
+
+clutter_build_config_h = configure_file(
+ input: 'clutter-build-config.h.meson',
+ output: 'clutter-build-config.h',
+ configuration: cdata,
+ install: false,
+)
+clutter_built_private_headers += clutter_build_config_h
+
+clutter_config_defines = []
+if have_wayland
+ clutter_config_defines += [
+ '#define CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT 1',
+ ]
+endif
+if have_x11
+ clutter_config_defines += [
+ '#define CLUTTER_WINDOWING_X11 "x11"',
+ '#define CLUTTER_INPUT_X11 "x11"',
+ '#define CLUTTER_WINDOWING_GLX "glx"',
+ ]
+endif
+if have_native_backend
+ clutter_config_defines += [
+ '#define CLUTTER_WINDOWING_EGL "eglnative"',
+ '#define CLUTTER_INPUT_EVDEV "evdev"',
+ ]
+endif
+clutter_config_defines += [
+ '#define CLUTTER_INPUT_NULL "null"',
+]
+clutter_config_defines_string = ''
+foreach clutter_config_define : clutter_config_defines
+ clutter_config_defines_string += clutter_config_define + '\n'
+endforeach
+
+cdata = configuration_data()
+cdata.set('CLUTTER_CONFIG_DEFINES', clutter_config_defines_string)
+
+clutter_config_h = configure_file(
+ input: 'clutter-config.h.in',
+ output: 'clutter-config.h',
+ configuration: cdata,
+ install: true,
+ install_dir: clutter_clutter_includedir,
+)
+clutter_built_headers += clutter_config_h
+
+clutter_enum_types = gnome.mkenums('clutter-enum-types',
+ sources: [clutter_headers, clutter_deprecated_headers],
+ c_template: 'clutter-enum-types.c.in',
+ h_template: 'clutter-enum-types.h.in',
+ install_dir: clutter_clutter_includedir,
+ install_header: true,
+)
+clutter_built_sources += clutter_enum_types[0]
+clutter_built_headers += clutter_enum_types[1]
+
+clutter_marshal = gnome.genmarshal('clutter-marshal',
+ prefix: '_clutter_marshal',
+ sources: 'clutter-marshal.list',
+ valist_marshallers: true,
+ extra_args: ['--prototypes'],
+ install_dir: clutter_clutter_includedir,
+ install_header: true,
+)
+clutter_built_sources += clutter_marshal[0]
+clutter_built_headers += clutter_marshal[1]
+
+libmutter_clutter_name = 'mutter-clutter-' + libmutter_api_version
+libmutter_clutter = shared_library(libmutter_clutter_name,
+ sources: [
+ clutter_sources,
+ clutter_headers,
+ clutter_private_headers,
+ clutter_nonintrospected_sources,
+ clutter_deprecated_sources,
+ clutter_deprecated_nonintrospected_sources,
+ clutter_deprecated_headers,
+ clutter_deprecated_private_headers,
+ clutter_backend_sources,
+ clutter_backend_nonintrospected_sources,
+ clutter_backend_headers,
+ clutter_backend_private_headers,
+ clutter_built_sources,
+ clutter_built_headers,
+ cally_sources,
+ cally_headers,
+ cally_private_headers,
+ ],
+ c_args: clutter_c_args,
+ include_directories: clutter_includes,
+ dependencies: [clutter_deps],
+ link_with: [
+ libmutter_cogl,
+ libmutter_cogl_pango,
+ libmutter_cogl_path,
+ ],
+ install_rpath: pkglibdir,
+ install_dir: pkglibdir,
+ install: true,
+)
+libmutter_clutter_dep = declare_dependency(
+ sources: [clutter_enum_types[1]],
+ link_with: libmutter_clutter,
+)
+
+if have_introspection
+ clutter_introspection_args = clutter_c_args + [
+ '-U_GNU_SOURCE', # _GNU_SOURCE triggers warnings in g-ir-scanner
+ '--quiet',
+ ]
+
+ libmutter_clutter_gir = gnome.generate_gir(libmutter_clutter,
+ sources: [
+ clutter_built_sources,
+ clutter_built_headers,
+ clutter_sources,
+ clutter_headers,
+ clutter_deprecated_sources,
+ clutter_deprecated_headers,
+ ],
+ nsversion: libmutter_api_version,
+ namespace: 'Clutter',
+ export_packages: [libmutter_clutter_name],
+ includes: [
+ libmutter_cogl_gir[0],
+ libmutter_cogl_pango_gir[0],
+ 'GL-1.0',
+ 'GObject-2.0',
+ 'cairo-1.0',
+ 'Atk-1.0',
+ 'Json-1.0',
+ ],
+ dependencies: [cogl_deps],
+ extra_args: clutter_introspection_args + ['--c-include=clutter/clutter.h'],
+ install_dir_gir: pkglibdir,
+ install_dir_typelib: pkglibdir,
+ install: true,
+ )
+
+ libmutter_cally_gir = gnome.generate_gir(libmutter_clutter,
+ sources: [
+ cally_sources,
+ cally_headers,
+ ],
+ nsversion: libmutter_api_version,
+ namespace: 'Cally',
+ includes: [
+ libmutter_cogl_gir[0],
+ libmutter_cogl_pango_gir[0],
+ libmutter_clutter_gir[0],
+ ],
+ dependencies: [cogl_deps],
+ extra_args: clutter_introspection_args,
+ install_dir_gir: pkglibdir,
+ install_dir_typelib: pkglibdir,
+ install: true
+ )
+
+ if have_x11
+ libmutter_clutter_x11_gir = gnome.generate_gir(libmutter_clutter,
+ sources: [
+ clutter_x11_sources,
+ clutter_x11_headers,
+ ],
+ nsversion: libmutter_api_version,
+ namespace: 'ClutterX11',
+ export_packages: ['mutter-clutter-x11-' + libmutter_api_version],
+ includes: [
+ libmutter_cogl_gir[0],
+ libmutter_cogl_pango_gir[0],
+ libmutter_clutter_gir[0],
+ 'xlib-2.0',
+ ],
+ dependencies: [],
+ extra_args: clutter_introspection_args,
+ install_dir_gir: pkglibdir,
+ install_dir_typelib: pkglibdir,
+ install: true
+ )
+ endif
+endif
+
+install_headers(clutter_headers,
+ subdir: clutter_clutter_includedir)
+
+install_headers(cally_headers,
+ subdir: join_paths(clutter_includedir, 'cally'))
+
+install_headers(clutter_deprecated_headers,
+ subdir: join_paths(clutter_clutter_includedir, 'deprecated'))
+
+install_headers(clutter_x11_headers,
+ subdir: join_paths(clutter_clutter_includedir, 'x11'))
+
+pkg.generate(
+ name: 'Mutters Clutter',
+ filebase: libmutter_clutter_name,
+ description: 'Mutters Clutter Private Library',
+ libraries: [libmutter_clutter, m_dep],
+ subdirs: join_paths(pkgname, 'clutter'),
+ requires: [clutter_pkg_deps, libmutter_cogl_name],
+ version: meson.project_version(),
+ variables: [
+ 'apiversion=' + libmutter_api_version,
+ ],
+)
+
+pkg.generate(
+ name: 'Mutters ClutterX11',
+ filebase: 'mutter-clutter-x11-' + libmutter_api_version,
+ description: 'Mutters ClutterX11 Private Library',
+ libraries: [libmutter_clutter, m_dep],
+ subdirs: join_paths(pkgname, 'clutter'),
+ requires: [clutter_pkg_deps, libmutter_cogl_name],
+ version: meson.project_version(),
+ variables: [
+ 'apiversion=' + libmutter_api_version,
+ ],
+)
diff --git a/clutter/meson.build b/clutter/meson.build
new file mode 100644
index 000000000..f0af1c679
--- /dev/null
+++ b/clutter/meson.build
@@ -0,0 +1,92 @@
+clutter_includedir = join_paths(pkgincludedir, 'clutter')
+clutter_srcdir = join_paths(top_srcdir, 'clutter')
+clutter_builddir = join_paths(builddir, 'clutter')
+
+clutter_includepath = include_directories('.', 'clutter')
+clutter_includes = [clutter_includepath, cogl_includepath]
+
+clutter_c_args = [
+ '-DCLUTTER_SYSCONFDIR="@0@"'.format(join_paths(prefix, sysconfdir)),
+ '-DCLUTTER_COMPILATION=1',
+ '-DCOGL_DISABLE_DEPRECATION_WARNINGS',
+ '-DG_LOG_DOMAIN="Clutter"',
+]
+
+clutter_debug_c_args = []
+if buildtype.startswith('debug')
+ clutter_debug_c_args += '-DG_DISABLE_CAST_CHECKS'
+ if buildtype == 'debug'
+ clutter_debug_c_args += '-DCLUTTER_ENABLE_DEBUG'
+ endif
+elif buildtype == 'release'
+ clutter_debug_c_args += [
+ '-DG_DISABLE_ASSERT',
+ '-DG_DISABLE_CHECKS',
+ '-DG_DISABLE_CAST_CHECKS',
+ ]
+endif
+
+clutter_c_args += clutter_debug_c_args
+
+clutter_pkg_deps = [
+ gdk_pixbuf_dep,
+ cairo_gobject_dep,
+ glib_dep,
+ gobject_dep,
+ gio_dep,
+ gthread_dep,
+ gmodule_no_export_dep,
+ atk_dep,
+ pangocairo_dep,
+ json_glib_dep,
+]
+
+if have_pango_ft2
+ clutter_pkg_deps += [
+ pangoft2_dep,
+ ]
+endif
+
+if have_wayland
+ clutter_pkg_deps += [
+ wayland_egl_dep,
+ wayland_server_dep,
+ ]
+endif
+
+if have_x11
+ clutter_pkg_deps += [
+ x11_dep,
+ xext_dep,
+ xdamage_dep,
+ xcomposite_dep,
+ xtst_dep,
+ xi_dep,
+ ]
+endif
+
+if have_native_backend
+ clutter_pkg_deps += [
+ libudev_dep,
+ libinput_dep,
+ xkbcommon_dep,
+ ]
+endif
+
+if have_libwacom
+ clutter_pkg_deps += [
+ libwacom_dep,
+ ]
+endif
+
+clutter_deps = [
+ clutter_pkg_deps,
+ libmutter_cogl_dep,
+ m_dep
+]
+
+subdir('clutter')
+
+if have_clutter_tests
+ subdir('tests')
+endif
diff --git a/clutter/tests/accessibility/meson.build b/clutter/tests/accessibility/meson.build
new file mode 100644
index 000000000..fe9732efc
--- /dev/null
+++ b/clutter/tests/accessibility/meson.build
@@ -0,0 +1,38 @@
+clutter_test_accessibility_common_sources = [
+ 'cally-examples-util.c',
+ 'cally-examples-util.h',
+]
+
+clutter_test_accessibility_c_args = [
+ '-DPREFIXDIR="@0@"'.format(libdir),
+ '-DCLUTTER_DISABLE_DEPRECATION_WARNINGS',
+ '-DGLIB_DISABLE_DEPRECATION_WARNINGS',
+]
+
+clutter_test_accessibility_c_args += clutter_debug_c_args
+
+clutter_accessibility_tests_dependencies = [
+ clutter_deps,
+ libmutter_clutter_dep,
+]
+
+clutter_accessibility_tests = [
+ 'cally-atkcomponent-example',
+ 'cally-atktext-example',
+ 'cally-atkevents-example',
+ 'cally-atkeditabletext-example',
+ 'cally-clone-example',
+]
+
+foreach test : clutter_accessibility_tests
+ executable(test,
+ sources: [
+ clutter_test_accessibility_common_sources,
+ test + '.c',
+ ],
+ include_directories: clutter_includes,
+ c_args: clutter_test_accessibility_c_args,
+ dependencies: [clutter_accessibility_tests_dependencies],
+ install: false,
+ )
+endforeach
diff --git a/clutter/tests/conform/meson.build b/clutter/tests/conform/meson.build
new file mode 100644
index 000000000..1387f4990
--- /dev/null
+++ b/clutter/tests/conform/meson.build
@@ -0,0 +1,84 @@
+clutter_tests_conform_srcdir = join_paths(clutter_srcdir, 'tests/conform')
+clutter_tests_conform_builddir = join_paths(clutter_builddir, 'tests/conform')
+
+clutter_tests_conform_c_args = [
+ '-DG_LOG_DOMAIN="Clutter-Conform"',
+ '-DCOGL_DISABLE_DEPRECATION_WARNINGS',
+]
+clutter_tests_conform_c_args += clutter_debug_c_args
+
+clutter_tests_conform_link_args = [
+ '-Wl,--export-dynamic',
+]
+
+clutter_conform_tests_actor_tests = [
+ 'actor-anchors',
+ 'actor-destroy',
+ 'actor-graph',
+ 'actor-invariants',
+ 'actor-iter',
+ 'actor-layout',
+ 'actor-meta',
+ 'actor-offscreen-limit-max-size',
+ 'actor-offscreen-redirect',
+ 'actor-paint-opacity',
+ 'actor-pick',
+ 'actor-shader-effect',
+ 'actor-size',
+]
+
+clutter_conform_tests_classes_tests = [
+ 'text',
+]
+
+clutter_conform_tests_general_tests = [
+ 'binding-pool',
+ 'color',
+ 'events-touch',
+ 'interval',
+ 'model',
+ 'script-parser',
+ 'units',
+]
+
+clutter_conform_tests_deprecated_tests = [
+ 'animator',
+ 'behaviours',
+ 'group',
+ 'rectangle',
+ 'texture',
+]
+
+clutter_conform_tests = []
+clutter_conform_tests += clutter_conform_tests_actor_tests
+clutter_conform_tests += clutter_conform_tests_classes_tests
+clutter_conform_tests += clutter_conform_tests_general_tests
+clutter_conform_tests += clutter_conform_tests_deprecated_tests
+
+test_env = environment()
+test_env.set('G_TEST_SRCDIR', clutter_tests_conform_srcdir)
+test_env.set('G_TEST_BUILDDIR', clutter_tests_conform_builddir)
+test_env.set('G_ENABLE_DIAGNOSTIC', '0')
+test_env.set('CLUTTER_ENABLE_DIAGNOSTIC', '0')
+test_env.set('CLUTTER_SCALE', '1')
+
+foreach test : clutter_conform_tests
+ test_executable = executable('@0@'.format(test),
+ sources: [
+ '@0@.c'.format(test),
+ ],
+ include_directories: clutter_includes,
+ c_args: clutter_tests_conform_c_args,
+ link_args: clutter_tests_conform_link_args,
+ dependencies: [
+ clutter_deps,
+ libmutter_clutter_dep,
+ libmutter_cogl_path_dep
+ ],
+ install: false,
+ )
+
+ test('clutter/conform/@0@'.format(test), test_executable,
+ env: test_env
+ )
+endforeach
diff --git a/clutter/tests/interactive/meson.build b/clutter/tests/interactive/meson.build
new file mode 100644
index 000000000..cc3a576e8
--- /dev/null
+++ b/clutter/tests/interactive/meson.build
@@ -0,0 +1,103 @@
+clutter_tests_interactive_srcdir = join_paths(clutter_srcdir, 'tests/interactive')
+
+clutter_tests_interactive_includepath = include_directories('.')
+#clutter_tests_interactive_builddir = join_paths(clutter_builddir, 'tests/interactive')
+
+clutter_tests_interactive_c_args = [
+ '-DTESTS_DATADIR="@0@"'.format(clutter_tests_interactive_srcdir),
+ '-DG_DISABLE_SINGLE_INCLUDES',
+ '-DGLIB_DISABLE_DEPRECATION_WARNINGS',
+ '-DCOGL_DISABLE_DEPRECATION_WARNINGS',
+ '-DCLUTTER_DISABLE_DEPRECATION_WARNINGS',
+]
+clutter_tests_interactive_c_args += clutter_debug_c_args
+
+clutter_tests_interactive_link_args = [
+ '-Wl,--export-dynamic',
+]
+
+clutter_tests_interactive_test_sources = [
+ 'test-texture-slicing.c',
+ 'test-texture-async.c',
+ 'test-texture-material.c',
+ 'test-events.c',
+ 'test-scale.c',
+ 'test-actors.c',
+ 'test-shader-effects.c',
+ 'test-script.c',
+ 'test-grab.c',
+ 'test-cogl-shader-glsl.c',
+ 'test-animator.c',
+ 'test-state.c',
+ 'test-state-animator.c',
+ 'test-fbo.c',
+ 'test-multistage.c',
+ 'test-cogl-tex-tile.c',
+ 'test-cogl-tex-convert.c',
+ 'test-cogl-tex-foreign.c',
+ 'test-cogl-offscreen.c',
+ 'test-cogl-tex-polygon.c',
+ 'test-cogl-multitexture.c',
+ 'test-stage-read-pixels.c',
+ 'test-paint-wrapper.c',
+ 'test-texture-quality.c',
+ 'test-layout.c',
+ 'test-animation.c',
+ 'test-easing.c',
+ 'test-binding-pool.c',
+ 'test-text.c',
+ 'test-text-field.c',
+ 'test-cairo-clock.c',
+ 'test-cairo-flowers.c',
+ 'test-cogl-vertex-buffer.c',
+ 'test-stage-sizing.c',
+ 'test-scrolling.c',
+ 'test-swipe-action.c',
+ 'test-cogl-point-sprites.c',
+ 'test-table-layout.c',
+ 'test-path-constraint.c',
+ 'test-state-script.c',
+ 'test-devices.c',
+ 'test-content.c',
+ 'test-keyframe-transition.c',
+ 'test-bind-constraint.c',
+ 'test-touch-events.c',
+ 'test-rotate-zoom.c',
+ 'test-image.c',
+]
+
+if have_x11
+ clutter_tests_interactive_test_sources += [
+ 'test-pixmap.c',
+ ]
+endif
+
+gen_test_unit_names = find_program('meson/gen-test-unit-names.sh')
+clutter_interactive_test_unit_names_h = custom_target('gen-test-unit-names',
+ output: 'test-unit-names.h',
+ input: clutter_tests_interactive_test_sources,
+ command: [gen_test_unit_names, '@OUTPUT@', '@INPUT@'],
+ install: false,
+)
+
+clutter_tests_interactive_sources = [
+ 'test-main.c',
+ clutter_interactive_test_unit_names_h,
+ clutter_tests_interactive_test_sources
+]
+
+executable('test-interactive',
+ sources: clutter_tests_interactive_sources,
+ include_directories: [
+ clutter_includes,
+ clutter_tests_interactive_includepath,
+ ],
+ c_args: clutter_tests_interactive_c_args,
+ link_args: clutter_tests_interactive_link_args,
+ dependencies: [
+ clutter_deps,
+ libmutter_clutter_dep,
+ gdk_pixbuf_dep,
+ ],
+ install: false,
+)
diff --git a/clutter/tests/interactive/meson/gen-test-unit-names.sh
b/clutter/tests/interactive/meson/gen-test-unit-names.sh
new file mode 100755
index 000000000..1912d4695
--- /dev/null
+++ b/clutter/tests/interactive/meson/gen-test-unit-names.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+outputfile=$1
+shift
+test_source_files="$@"
+
+echo '/* ** This file is autogenerated. Do not edit. ** */' > $outputfile
+echo '' >> $outputfile
+echo 'const char *test_unit_names[] = {' >> $outputfile
+
+for test_source_file in $test_source_files; do
+ echo " \"$(echo $test_source_file | sed 's/.*\(test-[a-z0-9\-]\+\)\.c/\1/')\"," >> $outputfile
+done
+
+echo '};' >> $outputfile
diff --git a/clutter/tests/meson.build b/clutter/tests/meson.build
new file mode 100644
index 000000000..125d81e97
--- /dev/null
+++ b/clutter/tests/meson.build
@@ -0,0 +1,5 @@
+subdir('accessibility')
+subdir('conform')
+subdir('interactive')
+subdir('micro-bench')
+subdir('performance')
diff --git a/clutter/tests/micro-bench/meson.build b/clutter/tests/micro-bench/meson.build
new file mode 100644
index 000000000..b8fe1e794
--- /dev/null
+++ b/clutter/tests/micro-bench/meson.build
@@ -0,0 +1,28 @@
+clutter_tests_micro_bench_c_args = [
+ '-DG_DISABLE_SINGLE_INCLUDES',
+ '-DGLIB_DISABLE_DEPRECATION_WARNINGS',
+ '-DCOGL_DISABLE_DEPRECATION_WARNINGS',
+ '-DCLUTTER_DISABLE_DEPRECATION_WARNINGS',
+]
+clutter_tests_micro_bench_c_args += clutter_debug_c_args
+
+clutter_tests_micro_bench_tests = [
+ 'test-text',
+ 'test-picking',
+ 'test-text-perf',
+ 'test-random-text',
+ 'test-cogl-perf',
+]
+
+foreach test : clutter_tests_micro_bench_tests
+ executable(test,
+ sources: '@0@.c'.format(test),
+ include_directories: clutter_includes,
+ c_args: clutter_tests_micro_bench_c_args,
+ dependencies: [
+ clutter_deps,
+ libmutter_clutter_dep,
+ ],
+ install: false,
+ )
+endforeach
diff --git a/clutter/tests/performance/meson.build b/clutter/tests/performance/meson.build
new file mode 100644
index 000000000..5d7157580
--- /dev/null
+++ b/clutter/tests/performance/meson.build
@@ -0,0 +1,35 @@
+clutter_tests_performance_c_args = [
+ '-DTESTS_DATA_DIR="@0@"'.format(join_paths(clutter_srcdir, 'tests/interactive')),
+ '-DG_DISABLE_SINGLE_INCLUDES',
+ '-DGLIB_DISABLE_DEPRECATION_WARNINGS',
+ '-DCOGL_DISABLE_DEPRECATION_WARNINGS',
+ '-DCLUTTER_DISABLE_DEPRECATION_WARNINGS',
+]
+
+clutter_tests_performance_c_args += clutter_debug_c_args
+
+clutter_tests_performance_tests = [
+ 'test-picking',
+ 'test-text-perf',
+ 'test-state',
+ 'test-state-interactive',
+ 'test-state-hidden',
+ 'test-state-mini',
+ 'test-state-pick',
+]
+
+foreach test : clutter_tests_performance_tests
+ executable(test,
+ sources: [
+ '@0@.c'.format(test),
+ 'test-common.h',
+ ],
+ include_directories: clutter_includes,
+ c_args: clutter_tests_performance_c_args,
+ dependencies: [
+ clutter_deps,
+ libmutter_clutter_dep,
+ ],
+ install: false,
+ )
+endforeach
diff --git a/cogl/cogl-config.h.meson b/cogl/cogl-config.h.meson
new file mode 100644
index 000000000..56946b299
--- /dev/null
+++ b/cogl/cogl-config.h.meson
@@ -0,0 +1,10 @@
+/* Have GL for rendering */
+#mesondefine HAVE_COGL_GL
+
+/* Have GLES 2.0 for rendering */
+#mesondefine HAVE_COGL_GLES2
+
+/* Enable unit tests */
+#mesondefine ENABLE_UNIT_TESTS
+
+#define COGL_CONFIG_H_INCLUDED 1
diff --git a/cogl/cogl-gles2/libmutter-cogl-gles2.map b/cogl/cogl-gles2/libmutter-cogl-gles2.map
new file mode 100644
index 000000000..8b2a54588
--- /dev/null
+++ b/cogl/cogl-gles2/libmutter-cogl-gles2.map
@@ -0,0 +1,6 @@
+{
+global:
+ gl*;
+local:
+ *;
+}
diff --git a/cogl/cogl-gles2/meson.build b/cogl/cogl-gles2/meson.build
new file mode 100644
index 000000000..60a745acf
--- /dev/null
+++ b/cogl/cogl-gles2/meson.build
@@ -0,0 +1,38 @@
+cogl_gles2_public_headers = [
+ 'GLES2/gl2.h',
+ 'GLES2/gl2ext.h',
+ 'GLES2/gl2platform.h',
+]
+
+cogl_gles2_sources = [
+ 'cogl-gles2-api.c',
+]
+
+libmutter_cogl_gles2 = shared_library('mutter-cogl-gles2-' + libmutter_api_version,
+ sources: [cogl_gles2_sources, cogl_gles2_public_headers],
+ c_args: cogl_c_args,
+ include_directories: [cogl_includepath, cogl_path_includepath],
+ link_depends: 'libmutter-cogl-gles2.map',
+ dependencies: [cogl_deps],
+ link_with: libmutter_cogl,
+ install_rpath: pkglibdir,
+ install_dir: pkglibdir,
+ install: true,
+)
+
+cogl_gles2_includedir = join_paths(cogl_includedir, 'cogl-gles2/GLES2')
+install_headers(cogl_gles2_public_headers,
+ subdir: cogl_gles2_includedir)
+
+pkg.generate(
+ name: 'CoglGles2',
+ filebase: 'mutter-cogl-gles2-' + libmutter_api_version,
+ description: 'A cogl GLES2 helper library for mutter',
+ libraries: [libmutter_cogl_gles2],
+ subdirs: join_paths(pkgname, 'cogl'),
+ requires: [cogl_pkg_deps, libmutter_cogl_name],
+ version: meson.project_version(),
+ variables: [
+ 'apiversion=' + libmutter_api_version,
+ ],
+)
diff --git a/cogl/cogl-pango/libmutter-cogl-pango.map b/cogl/cogl-pango/libmutter-cogl-pango.map
new file mode 100644
index 000000000..8d98b792d
--- /dev/null
+++ b/cogl/cogl-pango/libmutter-cogl-pango.map
@@ -0,0 +1,6 @@
+{
+global:
+ cogl_pango_*;
+local:
+ *;
+}
diff --git a/cogl/cogl-pango/meson.build b/cogl/cogl-pango/meson.build
new file mode 100644
index 000000000..0019624d4
--- /dev/null
+++ b/cogl/cogl-pango/meson.build
@@ -0,0 +1,74 @@
+cogl_pango_sources = [
+ 'cogl-pango-display-list.c',
+ 'cogl-pango-display-list.h',
+ 'cogl-pango-fontmap.c',
+ 'cogl-pango-glyph-cache.c',
+ 'cogl-pango-glyph-cache.h',
+ 'cogl-pango-pipeline-cache.c',
+ 'cogl-pango-pipeline-cache.h',
+ 'cogl-pango-private.h',
+ 'cogl-pango-render.c',
+]
+
+cogl_pango_public_headers = [
+ 'cogl-pango.h',
+]
+
+cogl_pango_deps = [
+ cogl_deps,
+ pango_dep,
+ pangocairo_dep,
+]
+
+libmutter_cogl_pango = shared_library('mutter-cogl-pango-' + libmutter_api_version,
+ sources: [cogl_pango_sources, cogl_pango_public_headers],
+ c_args: cogl_c_args,
+ include_directories: [cogl_includepath, cogl_path_includepath],
+ link_depends: 'libmutter-cogl-pango.map',
+ dependencies: cogl_pango_deps,
+ link_with: libmutter_cogl,
+ install_rpath: pkglibdir,
+ install_dir: pkglibdir,
+ install: true,
+)
+
+if have_introspection
+ libmutter_cogl_pango_gir = gnome.generate_gir(libmutter_cogl_pango,
+ sources: cogl_pango_public_headers,
+ nsversion: libmutter_api_version,
+ namespace: 'CoglPango',
+ symbol_prefix: 'cogl_pango',
+ header: 'cogl-pango.h',
+ includes: [
+ libmutter_cogl_gir[0],
+ 'Pango-1.0',
+ 'PangoCairo-1.0'
+ ],
+ dependencies: [cogl_deps, pango_dep],
+ link_with: [libmutter_cogl, libmutter_cogl_pango],
+ extra_args: [
+ '-UCOGL_COMPILATION',
+ '-DG_LOG_DOMAIN=\"CoglPango\"',
+ '-U_GNU_SOURCE',
+ ],
+ install_dir_gir: pkglibdir,
+ install_dir_typelib: pkglibdir,
+ install: true
+ )
+endif
+
+cogl_pango_includedir = join_paths(cogl_includedir, 'cogl-pango')
+install_headers(cogl_pango_public_headers, subdir: cogl_pango_includedir)
+
+pkg.generate(
+ name: 'CoglPango',
+ filebase: 'mutter-cogl-pango-' + libmutter_api_version,
+ description: 'A text rendering for Cogl in mutter',
+ libraries: [libmutter_cogl_pango],
+ subdirs: join_paths(pkgname, 'cogl'),
+ requires: [cogl_pkg_deps, libmutter_cogl_name],
+ version: meson.project_version(),
+ variables: [
+ 'apiversion=' + libmutter_api_version,
+ ],
+)
diff --git a/cogl/cogl-path/libmutter-cogl-path.map b/cogl/cogl-path/libmutter-cogl-path.map
new file mode 100644
index 000000000..9b1638317
--- /dev/null
+++ b/cogl/cogl-path/libmutter-cogl-path.map
@@ -0,0 +1,17 @@
+{
+global:
+ cogl_framebuffer_*;
+ cogl_path_*;
+ cogl_is_*;
+ cogl_clip_*;
+ cogl_get_*;
+ cogl_set_*;
+ cogl2_framebuffer_*;
+ cogl2_path_*;
+ cogl2_is_*;
+ cogl2_clip_*;
+ cogl2_get_*;
+ cogl2_set_*;
+local:
+ *;
+}
diff --git a/cogl/cogl-path/meson.build b/cogl/cogl-path/meson.build
new file mode 100644
index 000000000..f843d244f
--- /dev/null
+++ b/cogl/cogl-path/meson.build
@@ -0,0 +1,82 @@
+cogl_path_includedir = join_paths(cogl_includedir, 'cogl-path')
+
+cogl_path_public_headers = [
+ 'cogl-path.h',
+ 'cogl-path-functions.h',
+ 'cogl-path-types.h',
+]
+
+cogl_path_sources = [
+ 'cogl-path.c',
+ 'cogl-path-private.h',
+ 'tesselator/dict-list.h',
+ 'tesselator/dict.c',
+ 'tesselator/dict.h',
+ 'tesselator/geom.c',
+ 'tesselator/geom.h',
+ 'tesselator/gluos.h',
+ 'tesselator/memalloc.h',
+ 'tesselator/mesh.c',
+ 'tesselator/mesh.h',
+ 'tesselator/normal.c',
+ 'tesselator/normal.h',
+ 'tesselator/priorityq-heap.h',
+ 'tesselator/priorityq-sort.h',
+ 'tesselator/priorityq.c',
+ 'tesselator/priorityq.h',
+ 'tesselator/render.c',
+ 'tesselator/render.h',
+ 'tesselator/sweep.c',
+ 'tesselator/sweep.h',
+ 'tesselator/tess.c',
+ 'tesselator/tess.h',
+ 'tesselator/tesselator.h',
+ 'tesselator/tessmono.c',
+ 'tesselator/tessmono.h',
+ 'tesselator/GL/glu.h',
+]
+
+cogl_path_includepath = include_directories('.', 'tesselator')
+
+libmutter_cogl_path_enum_types = gnome.mkenums('cogl-path-enum-types',
+ sources: 'cogl-path-types.h',
+ c_template: 'cogl-path-enum-types.c.in',
+ h_template: 'cogl-path-enum-types.h.in',
+ install_dir: cogl_path_includedir,
+ install_header: true,
+)
+libmutter_cogl_path_enum_types_h = libmutter_cogl_path_enum_types[1]
+
+cogl_path_sources += libmutter_cogl_path_enum_types
+
+libmutter_cogl_path = shared_library('mutter-cogl-path-' + libmutter_api_version,
+ sources: [cogl_path_sources, cogl_path_public_headers],
+ c_args: cogl_c_args,
+ include_directories: [cogl_includepath, cogl_path_includepath],
+ link_depends: 'libmutter-cogl-path.map',
+ dependencies: [cogl_deps],
+ link_with: libmutter_cogl,
+ install_rpath: pkglibdir,
+ install_dir: pkglibdir,
+ install: true,
+)
+libmutter_cogl_path_dep = declare_dependency(
+ sources: [libmutter_cogl_path_enum_types_h],
+ link_with: libmutter_cogl_path
+)
+
+install_headers(cogl_path_public_headers,
+ subdir: cogl_path_includedir)
+
+pkg.generate(
+ name: 'CoglPath',
+ filebase: 'mutter-cogl-path-' + libmutter_api_version,
+ description: 'A 2D path drawing library for Cogl in mutter',
+ libraries: [libmutter_cogl_path],
+ subdirs: join_paths(pkgname, 'cogl'),
+ requires: [cogl_pkg_deps, libmutter_cogl_name],
+ version: meson.project_version(),
+ variables: [
+ 'apiversion=' + libmutter_api_version,
+ ],
+)
diff --git a/cogl/cogl/cogl-defines.h.meson b/cogl/cogl/cogl-defines.h.meson
new file mode 100644
index 000000000..6e144b29c
--- /dev/null
+++ b/cogl/cogl/cogl-defines.h.meson
@@ -0,0 +1,48 @@
+/*
+ * Cogl
+ *
+ * A Low Level GPU Graphics and Utilities API
+ *
+ * Copyright (C) 2007,2008,2009,2010 Intel Corporation.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#include <poll.h>
+
+#define COGL_SYSDEF_POLLIN POLLIN
+#define COGL_SYSDEF_POLLPRI POLLPRI
+#define COGL_SYSDEF_POLLOUT POLLOUT
+#define COGL_SYSDEF_POLLERR POLLERR
+#define COGL_SYSDEF_POLLHUP POLLHUP
+#define COGL_SYSDEF_POLLNVAL POLLNVAL
+
+#mesondefine COGL_HAS_GL
+#mesondefine CLUTTER_COGL_HAS_GL
+#mesondefine COGL_HAS_GLX_SUPPORT
+#mesondefine COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
+#mesondefine COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT
+#mesondefine COGL_HAS_EGL_SUPPORT
+#mesondefine COGL_HAS_X11
+#mesondefine COGL_HAS_X11_SUPPORT
+#mesondefine COGL_HAS_XLIB
+#mesondefine COGL_HAS_XLIB_SUPPORT
diff --git a/cogl/cogl/libmutter-cogl.map b/cogl/cogl/libmutter-cogl.map
new file mode 100644
index 000000000..ea0b66fcd
--- /dev/null
+++ b/cogl/cogl/libmutter-cogl.map
@@ -0,0 +1,51 @@
+{
+global:
+ cogl*;
+ _cogl_debug_flags;
+ _cogl_atlas_new;
+ _cogl_atlas_add_reorganize_callback;
+ _cogl_atlas_reserve_space;
+ _cogl_callback;
+ _cogl_util_get_eye_planes_for_screen_poly;
+ _cogl_atlas_texture_remove_reorganize_callback;
+ _cogl_atlas_texture_add_reorganize_callback;
+ _cogl_texture_get_format;
+ _cogl_texture_foreach_sub_texture_in_region;
+ _cogl_texture_set_region;
+ _cogl_profile_trace_message;
+ _cogl_context_get_default;
+ _cogl_framebuffer_get_stencil_bits;
+ _cogl_clip_stack_push_rectangle;
+ _cogl_framebuffer_get_modelview_stack;
+ _cogl_object_default_unref;
+ _cogl_pipeline_foreach_layer_internal;
+ _cogl_clip_stack_push_primitive;
+ _cogl_buffer_unmap_for_fill_or_fallback;
+ _cogl_framebuffer_draw_primitive;
+ _cogl_debug_instances;
+ _cogl_framebuffer_get_projection_stack;
+ _cogl_pipeline_layer_get_texture;
+ _cogl_buffer_map_for_fill_or_fallback;
+ _cogl_texture_can_hardware_repeat;
+ _cogl_pipeline_prune_to_n_layers;
+ _cogl_primitive_draw;
+ #test_;
+ #unit_test_;
+ _cogl_winsys_glx_get_vtable;
+ _cogl_winsys_egl_xlib_get_vtable;
+ _cogl_winsys_egl_get_vtable;
+ _cogl_closure_disconnect;
+ _cogl_onscreen_notify_complete;
+ _cogl_onscreen_notify_frame_sync;
+ _cogl_winsys_egl_renderer_connect_common;
+ _cogl_winsys_error_quark;
+ _cogl_set_error;
+ _cogl_poll_renderer_add_fd;
+ _cogl_poll_renderer_add_idle;
+ _cogl_framebuffer_winsys_update_size;
+ _cogl_winsys_egl_make_current;
+ _cogl_winsys_egl_ensure_current;
+ _cogl_pixel_format_get_bytes_per_pixel).*";
+local:
+ *;
+}
diff --git a/cogl/cogl/meson.build b/cogl/cogl/meson.build
new file mode 100644
index 000000000..7641e5de3
--- /dev/null
+++ b/cogl/cogl/meson.build
@@ -0,0 +1,531 @@
+cogl_cogl_includedir = join_paths(cogl_includedir, 'cogl')
+
+cdata = configuration_data()
+cdata.set('COGL_HAS_GL', have_gl)
+cdata.set('CLUTTER_COGL_HAS_GL', have_gl)
+cdata.set('COGL_HAS_GLX_SUPPORT', have_glx)
+cdata.set('COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT', have_wayland)
+cdata.set('COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT', have_egl_xlib)
+cdata.set('COGL_HAS_EGL_SUPPORT', have_egl)
+cdata.set('COGL_HAS_X11', have_x11)
+cdata.set('COGL_HAS_X11_SUPPORT', have_x11)
+cdata.set('COGL_HAS_XLIB', have_x11)
+cdata.set('COGL_HAS_XLIB_SUPPORT', have_x11)
+
+cogl_defines_h = configure_file(
+ input: 'cogl-defines.h.meson',
+ output: 'cogl-defines.h',
+ configuration: cdata,
+ install_dir: cogl_cogl_includedir,
+ install: true,
+)
+
+if have_gl
+ cogl_gl_header_includes = ['GL/gl.h']
+elif have_gles2
+ cogl_gl_header_includes = ['GLES2/gl2.h', 'GLES2/gl2ext.h']
+else
+ error('Neither GLES2 or OpenGL was enabled')
+endif
+
+cogl_gl_header_includes_string = ''
+foreach gl_header : cogl_gl_header_includes
+ cogl_gl_header_includes_string += '#include <@0@>\n'.format(gl_header)
+endforeach
+
+built_headers = []
+
+cdata = configuration_data()
+cdata.set('COGL_GL_HEADER_INCLUDES', cogl_gl_header_includes_string)
+
+cogl_gl_header_h = configure_file(
+ input: 'cogl-gl-header.h.in',
+ output: 'cogl-gl-header.h',
+ configuration: cdata,
+ install: false,
+)
+built_headers += [cogl_gl_header_h]
+
+if have_egl
+ cogl_egl_includes_string = '#include <EGL/egl.h>\n#include <EGL/eglext.h>'
+else
+ cogl_egl_includes_string = ''
+endif
+
+cdata = configuration_data()
+cdata.set('COGL_EGL_INCLUDES', cogl_egl_includes_string)
+cogl_egl_defines_h = configure_file(
+ input: 'cogl-egl-defines.h.in',
+ output: 'cogl-egl-defines.h',
+ configuration: cdata,
+ install: false,
+)
+built_headers += [cogl_gl_header_h]
+
+cogl_deprecated_headers = [
+ 'deprecated/cogl-material-compat.h',
+ 'deprecated/cogl-vertex-buffer.h',
+ 'deprecated/cogl-shader.h',
+ 'deprecated/cogl-clutter.h',
+ 'deprecated/cogl-type-casts.h',
+ 'deprecated/cogl-auto-texture.h',
+]
+
+cogl_deprecated_nonintrospected_headers = [
+ 'deprecated/cogl-framebuffer-deprecated.h',
+]
+
+cogl_headers = [
+ 'cogl1-context.h',
+ 'cogl-bitmap.h',
+ 'cogl-color.h',
+ 'cogl-matrix.h',
+ 'cogl-offscreen.h',
+ 'cogl-primitives.h',
+ 'cogl-texture.h',
+ 'cogl-types.h',
+ 'cogl.h',
+]
+
+cogl_nonintrospected_headers = [
+ 'cogl-deprecated.h',
+ 'cogl-pango.h',
+ 'cogl-object.h',
+ 'cogl-renderer.h',
+ 'cogl-swap-chain.h',
+ 'cogl-onscreen-template.h',
+ 'cogl-display.h',
+ 'cogl-context.h',
+ 'cogl-pipeline.h',
+ 'cogl-pipeline-state.h',
+ 'cogl-pipeline-layer-state.h',
+ 'cogl-snippet.h',
+ 'cogl-gles2.h',
+ 'cogl-gles2-types.h',
+ 'cogl-index-buffer.h',
+ 'cogl-attribute-buffer.h',
+ 'cogl-indices.h',
+ 'cogl-attribute.h',
+ 'cogl-primitive.h',
+ 'cogl-framebuffer.h',
+ 'cogl-onscreen.h',
+ 'cogl-frame-info.h',
+ 'cogl-vector.h',
+ 'cogl-euler.h',
+ 'cogl-output.h',
+ 'cogl-quaternion.h',
+ 'cogl-matrix-stack.h',
+ 'cogl-poll.h',
+ 'cogl-texture-3d.h',
+ 'cogl-texture-2d.h',
+ 'cogl-texture-2d-gl.h',
+ 'cogl-texture-rectangle.h',
+ 'cogl-texture-2d-sliced.h',
+ 'cogl-sub-texture.h',
+ 'cogl-atlas-texture.h',
+ 'cogl-meta-texture.h',
+ 'cogl-primitive-texture.h',
+ 'cogl-depth-state.h',
+ 'cogl-buffer.h',
+ 'cogl-pixel-buffer.h',
+ 'cogl-macros.h',
+ 'cogl-fence.h',
+ 'cogl-version.h',
+ 'cogl-error.h',
+ 'cogl-gtype-private.h',
+ 'cogl-glib-source.h',
+]
+
+cogl_nodist_headers = [
+]
+
+cogl_noop_driver_sources = [
+ 'driver/nop/cogl-driver-nop.c',
+ 'driver/nop/cogl-framebuffer-nop-private.h',
+ 'driver/nop/cogl-framebuffer-nop.c',
+ 'driver/nop/cogl-attribute-nop-private.h',
+ 'driver/nop/cogl-attribute-nop.c',
+ 'driver/nop/cogl-clip-stack-nop-private.h',
+ 'driver/nop/cogl-clip-stack-nop.c',
+ 'driver/nop/cogl-texture-2d-nop-private.h',
+ 'driver/nop/cogl-texture-2d-nop.c',
+]
+
+cogl_gl_prototype_headers = [
+ 'gl-prototypes/cogl-gles2-functions.h',
+ 'gl-prototypes/cogl-core-functions.h',
+ 'gl-prototypes/cogl-in-gles-core-functions.h',
+ 'gl-prototypes/cogl-in-gles2-core-functions.h',
+ 'gl-prototypes/cogl-glsl-functions.h',
+]
+
+cogl_common_driver_sources = [
+ 'driver/gl/cogl-util-gl-private.h',
+ 'driver/gl/cogl-util-gl.c',
+ 'driver/gl/cogl-framebuffer-gl-private.h',
+ 'driver/gl/cogl-framebuffer-gl.c',
+ 'driver/gl/cogl-texture-gl-private.h',
+ 'driver/gl/cogl-texture-gl.c',
+ 'driver/gl/cogl-texture-2d-gl-private.h',
+ 'driver/gl/cogl-texture-2d-gl.c',
+ 'driver/gl/cogl-attribute-gl-private.h',
+ 'driver/gl/cogl-attribute-gl.c',
+ 'driver/gl/cogl-clip-stack-gl-private.h',
+ 'driver/gl/cogl-clip-stack-gl.c',
+ 'driver/gl/cogl-buffer-gl-private.h',
+ 'driver/gl/cogl-buffer-gl.c',
+ 'driver/gl/cogl-pipeline-opengl.c',
+ 'driver/gl/cogl-pipeline-opengl-private.h',
+ 'driver/gl/cogl-pipeline-fragend-glsl.c',
+ 'driver/gl/cogl-pipeline-fragend-glsl-private.h',
+ 'driver/gl/cogl-pipeline-vertend-glsl.c',
+ 'driver/gl/cogl-pipeline-vertend-glsl-private.h',
+ 'driver/gl/cogl-pipeline-progend-glsl.c',
+ 'driver/gl/cogl-pipeline-progend-glsl-private.h',
+]
+
+gl_driver_sources = [
+ 'driver/gl/gl/cogl-driver-gl.c',
+ 'driver/gl/gl/cogl-texture-driver-gl.c',
+]
+
+gles_driver_sources = [
+ 'driver/gl/gles/cogl-driver-gles.c',
+ 'driver/gl/gles/cogl-texture-driver-gles.c',
+]
+
+cogl_driver_sources = [
+ cogl_noop_driver_sources,
+ cogl_common_driver_sources,
+]
+
+if have_gl
+ cogl_driver_sources += gl_driver_sources
+endif
+
+if have_gles2
+ cogl_driver_sources += gles_driver_sources
+endif
+
+cogl_sources = [
+ cogl_driver_sources,
+
+ 'winsys/cogl-winsys-private.h',
+ 'winsys/cogl-winsys.c',
+ 'cogl-private.h',
+ 'cogl-i18n-private.h',
+ 'cogl-debug.h',
+ 'cogl-debug-options.h',
+ 'cogl-gpu-info.c',
+ 'cogl-gpu-info-private.h',
+ 'cogl-context-private.h',
+ 'cogl-context.c',
+ 'cogl-renderer-private.h',
+ 'cogl-renderer.h',
+ 'cogl-renderer.c',
+ 'cogl-swap-chain-private.h',
+ 'cogl-swap-chain.h',
+ 'cogl-swap-chain.c',
+ 'cogl-onscreen-template-private.h',
+ 'cogl-onscreen-template.h',
+ 'cogl-onscreen-template.c',
+ 'cogl-display-private.h',
+ 'cogl-display.h',
+ 'cogl-display.c',
+ 'cogl-driver.h',
+ 'cogl.c',
+ 'cogl-object-private.h',
+ 'cogl-object.h',
+ 'cogl-object.c',
+ 'cogl-util.h',
+ 'cogl-util.c',
+ 'cogl-bitmap-private.h',
+ 'cogl-bitmap.c',
+ 'cogl-bitmap-conversion.c',
+ 'cogl-bitmap-packing.h',
+ 'cogl-primitives-private.h',
+ 'cogl-primitives.h',
+ 'cogl-primitives.c',
+ 'cogl-bitmap-pixbuf.c',
+ 'cogl-clip-stack.h',
+ 'cogl-clip-stack.c',
+ 'cogl-feature-private.h',
+ 'cogl-feature-private.c',
+ 'cogl-color-private.h',
+ 'cogl-color.c',
+ 'cogl-buffer-private.h',
+ 'cogl-buffer.c',
+ 'cogl-pixel-buffer-private.h',
+ 'cogl-pixel-buffer.c',
+ 'cogl-index-buffer-private.h',
+ 'cogl-index-buffer.c',
+ 'cogl-attribute-buffer-private.h',
+ 'cogl-attribute-buffer.c',
+ 'cogl-indices-private.h',
+ 'cogl-indices.c',
+ 'cogl-attribute-private.h',
+ 'cogl-attribute.c',
+ 'cogl-primitive-private.h',
+ 'cogl-primitive.c',
+ 'cogl-matrix.c',
+ 'cogl-vector.c',
+ 'cogl-euler.c',
+ 'cogl-quaternion-private.h',
+ 'cogl-quaternion.c',
+ 'cogl-matrix-private.h',
+ 'cogl-matrix-stack.c',
+ 'cogl-matrix-stack-private.h',
+ 'cogl-depth-state.c',
+ 'cogl-depth-state-private.h',
+ 'cogl-node.c',
+ 'cogl-node-private.h',
+ 'cogl-pipeline.c',
+ 'cogl-pipeline-private.h',
+ 'cogl-pipeline-layer.c',
+ 'cogl-pipeline-layer-private.h',
+ 'cogl-pipeline-state.c',
+ 'cogl-pipeline-layer-state-private.h',
+ 'cogl-pipeline-layer-state.c',
+ 'cogl-pipeline-state-private.h',
+ 'cogl-pipeline-debug.c',
+ 'cogl-glsl-shader.c',
+ 'cogl-glsl-shader-private.h',
+ 'cogl-glsl-shader-boilerplate.h',
+ 'cogl-pipeline-snippet-private.h',
+ 'cogl-pipeline-snippet.c',
+ 'cogl-pipeline-cache.h',
+ 'cogl-pipeline-cache.c',
+ 'cogl-pipeline-hash-table.h',
+ 'cogl-pipeline-hash-table.c',
+ 'cogl-sampler-cache.c',
+ 'cogl-sampler-cache-private.h',
+ 'cogl-blend-string.c',
+ 'cogl-blend-string.h',
+ 'cogl-debug.c',
+ 'cogl-sub-texture-private.h',
+ 'cogl-texture-private.h',
+ 'cogl-texture-2d-private.h',
+ 'cogl-texture-2d-sliced-private.h',
+ 'cogl-texture-3d-private.h',
+ 'cogl-texture-driver.h',
+ 'cogl-sub-texture.c',
+ 'cogl-texture.c',
+ 'cogl-texture-2d.c',
+ 'cogl-texture-2d-sliced.c',
+ 'cogl-texture-3d.c',
+ 'cogl-texture-rectangle-private.h',
+ 'cogl-texture-rectangle.c',
+ 'cogl-rectangle-map.h',
+ 'cogl-rectangle-map.c',
+ 'cogl-atlas.h',
+ 'cogl-atlas.c',
+ 'cogl-atlas-texture-private.h',
+ 'cogl-atlas-texture.c',
+ 'cogl-meta-texture.c',
+ 'cogl-primitive-texture.c',
+ 'cogl-blit.h',
+ 'cogl-blit.c',
+ 'cogl-spans.h',
+ 'cogl-spans.c',
+ 'cogl-journal-private.h',
+ 'cogl-journal.c',
+ 'cogl-frame-info-private.h',
+ 'cogl-frame-info.c',
+ 'cogl-framebuffer-private.h',
+ 'cogl-framebuffer.c',
+ 'cogl-onscreen-private.h',
+ 'cogl-onscreen.c',
+ 'cogl-output-private.h',
+ 'cogl-output.c',
+ 'cogl-profile.h',
+ 'cogl-profile.c',
+ 'cogl-flags.h',
+ 'cogl-bitmask.h',
+ 'cogl-bitmask.c',
+ 'cogl-gtype.c',
+ 'cogl-gtype-private.h',
+ 'cogl-point-in-poly-private.h',
+ 'cogl-point-in-poly.c',
+ 'cogl-list.c',
+ 'cogl-list.h',
+ 'winsys/cogl-winsys-stub-private.h',
+ 'winsys/cogl-winsys-stub.c',
+ 'cogl-config-private.h',
+ 'cogl-config.c',
+ 'cogl-boxed-value.h',
+ 'cogl-boxed-value.c',
+ 'cogl-snippet-private.h',
+ 'cogl-snippet.c',
+ 'cogl-poll-private.h',
+ 'cogl-poll.c',
+ 'gl-prototypes/cogl-all-functions.h',
+ 'gl-prototypes/cogl-fixed-functions.h',
+ 'cogl-memory-stack-private.h',
+ 'cogl-memory-stack.c',
+ 'cogl-magazine-private.h',
+ 'cogl-magazine.c',
+ 'cogl-gles2-context-private.h',
+ 'cogl-gles2-context.c',
+ 'cogl-error-private.h',
+ 'cogl-error.c',
+ 'cogl-closure-list-private.h',
+ 'cogl-closure-list.c',
+ 'cogl-fence.c',
+ 'cogl-fence-private.h',
+ 'deprecated/cogl-vertex-buffer-private.h',
+ 'deprecated/cogl-vertex-buffer.c',
+ 'deprecated/cogl-material-compat.c',
+ 'deprecated/cogl-program.c',
+ 'deprecated/cogl-program-private.h',
+ 'deprecated/cogl-auto-texture.c',
+ 'deprecated/cogl-shader-private.h',
+ 'deprecated/cogl-shader.c',
+ 'deprecated/cogl-clutter.c',
+ 'deprecated/cogl-framebuffer-deprecated.c',
+ 'cogl-glib-source.c',
+ 'cogl-mutter.h',
+]
+
+if have_x11
+ cogl_nonintrospected_headers += [
+ 'winsys/cogl-texture-pixmap-x11.h',
+ 'cogl-xlib.h',
+ ]
+ cogl_deprecated_nonintrospected_headers += [
+ 'deprecated/cogl-clutter-xlib.h',
+ ]
+ cogl_sources += [
+ 'cogl-x11-renderer-private.h',
+ 'cogl-xlib-private.h',
+ 'cogl-xlib-renderer-private.h',
+ 'cogl-xlib-renderer.c',
+ 'cogl-xlib.c',
+ 'winsys/cogl-texture-pixmap-x11-private.h',
+ 'winsys/cogl-texture-pixmap-x11.c',
+ ]
+ cogl_headers += [
+ 'cogl-xlib-renderer.h'
+ ]
+endif
+
+if have_glx
+ cogl_nonintrospected_headers += [
+ 'cogl-glx.h',
+ ]
+ cogl_sources += [
+ 'cogl-glx-display-private.h',
+ 'cogl-glx-renderer-private.h',
+ 'winsys/cogl-winsys-glx-feature-functions.h',
+ 'winsys/cogl-winsys-glx-private.h',
+ 'winsys/cogl-winsys-glx.c',
+ ]
+endif
+
+if have_wayland
+ cogl_nonintrospected_headers += [
+ 'cogl-wayland-server.h',
+ ]
+endif
+
+if have_egl
+ cogl_nonintrospected_headers += [
+ 'cogl-egl.h',
+ cogl_egl_defines_h,
+ ]
+ cogl_sources += [
+ 'cogl-egl-private.h',
+ 'winsys/cogl-winsys-egl.c',
+ 'winsys/cogl-winsys-egl-feature-functions.h',
+ 'winsys/cogl-winsys-egl-private.h',
+ ]
+endif
+
+if have_egl_xlib
+ cogl_sources += [
+ 'winsys/cogl-winsys-egl-x11.c',
+ 'winsys/cogl-winsys-egl-x11-private.h',
+ ]
+endif
+
+cogl_introspected_headers = [
+ cogl_headers,
+ cogl_deprecated_headers,
+]
+
+cogl_headers_all = [
+ cogl_introspected_headers,
+ cogl_nonintrospected_headers,
+ cogl_deprecated_headers,
+ cogl_deprecated_nonintrospected_headers,
+]
+
+cogl_test_deps = []
+
+if have_cogl_tests
+ cogl_test_deps += [libmutter_cogl_test_fixtures_dep]
+endif
+
+libmutter_cogl_name = 'mutter-cogl-' + libmutter_api_version
+libmutter_cogl = shared_library(libmutter_cogl_name,
+ sources: [cogl_sources, cogl_headers_all],
+ c_args: cogl_c_args,
+ include_directories: cogl_includepath,
+ link_depends: 'libmutter-cogl.map',
+ dependencies: [cogl_deps, cogl_test_deps],
+ install_rpath: pkglibdir,
+ install_dir: pkglibdir,
+ install: true,
+)
+libmutter_cogl_dep = declare_dependency(
+ link_with: libmutter_cogl,
+)
+
+if have_introspection
+ libmutter_cogl_gir = gnome.generate_gir(libmutter_cogl,
+ sources: cogl_introspected_headers,
+ nsversion: libmutter_api_version,
+ namespace: 'Cogl',
+ includes: ['GL-1.0', 'GObject-2.0'],
+ dependencies: [cogl_deps],
+ extra_args: [
+ '-UCOGL_COMPILATION',
+ '-D__COGL_H_INSIDE__',
+ '-D__COGL_XLIB_H_INSIDE__',
+ '-D__COGL_EGL_H_INSIDE__',
+ '-D__COGL_GLX_H_INSIDE__',
+ '-DCOGL_GIR_SCANNING',
+ '-U_GNU_SOURCE',
+ ],
+ install_dir_gir: pkglibdir,
+ install_dir_typelib: pkglibdir,
+ install: true
+ )
+endif
+
+install_headers([
+ cogl_headers,
+ cogl_nonintrospected_headers,
+ ],
+ subdir: cogl_cogl_includedir)
+
+install_headers([
+ cogl_deprecated_headers,
+ cogl_deprecated_nonintrospected_headers,
+ ],
+ subdir: join_paths(cogl_cogl_includedir, 'deprecated'))
+
+install_headers(cogl_gl_prototype_headers,
+ subdir: join_paths(cogl_cogl_includedir, 'gl-prototypes'))
+
+pkg.generate(
+ name: 'Cogl',
+ filebase: libmutter_cogl_name,
+ description: 'An object oriented GL/GLES Abstraction/Utility Layer in mutter',
+ libraries: [libmutter_cogl, m_dep],
+ subdirs: join_paths(pkgname, 'cogl'),
+ requires: [cogl_pkg_deps],
+ version: meson.project_version(),
+ variables: [
+ 'apiversion=' + libmutter_api_version,
+ ],
+)
diff --git a/cogl/meson.build b/cogl/meson.build
new file mode 100644
index 000000000..1618c33bc
--- /dev/null
+++ b/cogl/meson.build
@@ -0,0 +1,116 @@
+cogl_includedir = join_paths(pkgincludedir, 'cogl')
+cogl_srcdir = join_paths(top_srcdir, 'cogl')
+cogl_builddir = join_paths(builddir, 'cogl')
+
+cogl_includepath = include_directories('.', 'cogl')
+
+cdata = configuration_data()
+cdata.set('HAVE_COGL_GL', have_gl)
+cdata.set('HAVE_COGL_GLES2', have_gles2)
+cdata.set('ENABLE_UNIT_TESTS', have_cogl_tests)
+
+cogl_config_h = configure_file(
+ input: 'cogl-config.h.meson',
+ output: 'cogl-config.h',
+ configuration: cdata)
+
+# TODO: Remove this when autotools support is removed
+cogl_mutter_config_h = configure_file(
+ input: 'cogl-config.h.meson',
+ output: 'cogl-mutter-config.h',
+ configuration: cdata)
+
+cogl_pkg_deps = [
+ cairo_dep,
+ #uprof_dep,
+ glib_dep,
+ gobject_dep,
+ gmodule_no_export_dep,
+ gdk_pixbuf_dep,
+]
+
+if have_wayland
+ cogl_pkg_deps += [
+ wayland_server_dep,
+ ]
+endif
+
+if have_egl
+ cogl_pkg_deps += [
+ egl_dep,
+ ]
+endif
+
+if have_x11
+ cogl_pkg_deps += [
+ x11_dep,
+ xext_dep,
+ xfixes_dep,
+ xdamage_dep,
+ xcomposite_dep,
+ xrandr_dep,
+ ]
+endif
+
+if have_gl
+ cogl_pkg_deps += [
+ gl_dep,
+ ]
+endif
+
+if have_gles2
+ cogl_pkg_deps += [
+ gles2_dep,
+ ]
+endif
+
+cogl_deps = [
+ cogl_pkg_deps,
+ m_dep,
+]
+
+cogl_c_args = [
+ '-DCOGL_LOCALEDIR="@0@"'.format(localedir),
+ '-DCOGL_COMPILATION',
+]
+
+if have_gl
+ cogl_c_args += [
+ '-DCOGL_GL_LIBNAME="@0@"'.format(gl_libname)
+ ]
+endif
+
+if have_gles2
+ cogl_c_args += [
+ '-DCOGL_GLES2_LIBNAME="@0@"'.format(gles2_libname)
+ ]
+endif
+
+cogl_debug_c_args = []
+if buildtype.startswith('debug')
+ cogl_debug_c_args += [
+ '-DCOGL_GL_DEBUG',
+ '-DCOGL_OBJECT_DEBUG',
+ '-DCOGL_ENABLE_DEBUG',
+ ]
+elif buildtype == 'release'
+ cogl_debug_c_args += [
+ '-DG_DISABLE_CHECKS',
+ '-DG_DISABLE_CAST_CHECKS',
+ ]
+endif
+
+cogl_c_args += cogl_debug_c_args
+
+if have_cogl_tests
+ subdir('test-fixtures')
+endif
+subdir('cogl')
+subdir('cogl-path')
+subdir('cogl-pango')
+if have_gles2
+ subdir('cogl-gles2')
+endif
+if have_cogl_tests
+ subdir('tests')
+endif
diff --git a/cogl/test-fixtures/meson.build b/cogl/test-fixtures/meson.build
new file mode 100644
index 000000000..d4bb2f911
--- /dev/null
+++ b/cogl/test-fixtures/meson.build
@@ -0,0 +1,22 @@
+cogl_test_fixtures_includepath = [include_directories('.')]
+
+cogl_test_fixtures_sources = [
+ 'test-unit.h',
+ 'test-utils.h',
+ 'test-utils.c',
+]
+
+test_datadir = join_paths(cogl_srcdir, 'tests', 'data')
+
+libmutter_cogl_test_fixtures = static_library('mutter-cogl-test-fixtures',
+ sources: cogl_test_fixtures_sources,
+ c_args: [cogl_c_args, '-DTEST_DATADIR=@0@'.format(test_datadir)],
+ link_args: ['-Wl,--no-undefined', '-Wl,--unresolved-symbols=ignore-in-object-files'],
+ include_directories: cogl_includepath,
+ dependencies: [cogl_deps],
+ install: false,
+)
+
+libmutter_cogl_test_fixtures_dep = declare_dependency(
+ link_with: libmutter_cogl_test_fixtures
+)
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
new file mode 100644
index 000000000..5e152c45e
--- /dev/null
+++ b/cogl/tests/conform/meson.build
@@ -0,0 +1,106 @@
+cogl_test_conformance_sources = [
+ 'test-conform-main.c',
+ 'test-atlas-migration.c',
+ 'test-blend-strings.c',
+ 'test-blend.c',
+ 'test-depth-test.c',
+ 'test-color-hsl.c',
+ 'test-color-mask.c',
+ 'test-backface-culling.c',
+ 'test-just-vertex-shader.c',
+ 'test-pipeline-user-matrix.c',
+ 'test-pipeline-uniforms.c',
+ 'test-pixel-buffer.c',
+ 'test-premult.c',
+ 'test-snippets.c',
+ 'test-wrap-modes.c',
+ 'test-sub-texture.c',
+ 'test-custom-attributes.c',
+ 'test-offscreen.c',
+ 'test-primitive.c',
+ 'test-texture-3d.c',
+ 'test-sparse-pipeline.c',
+ 'test-read-texture-formats.c',
+ 'test-write-texture-formats.c',
+ 'test-point-size.c',
+ 'test-point-size-attribute.c',
+ 'test-point-sprite.c',
+ 'test-no-gl-header.c',
+ 'test-version.c',
+ 'test-gles2-context.c',
+ 'test-euler-quaternion.c',
+ 'test-layer-remove.c',
+ 'test-alpha-test.c',
+ 'test-map-buffer-range.c',
+ 'test-npot-texture.c',
+ 'test-alpha-textures.c',
+ 'test-wrap-rectangle-textures.c',
+ 'test-texture-get-set-data.c',
+ 'test-framebuffer-get-bits.c',
+ 'test-primitive-and-journal.c',
+ 'test-copy-replace-texture.c',
+ 'test-pipeline-cache-unrefs-texture.c',
+ 'test-texture-no-allocate.c',
+ 'test-pipeline-shader-state.c',
+ 'test-texture-rg.c',
+ 'test-fence.c',
+ 'test-path.c',
+ 'test-path-clip.c',
+]
+
+#unported = [
+# "test-fixed.c",
+# "test-materials.c",
+# "test-viewport.c",
+# "test-multitexture.c",
+# "test-npot-texture.c",
+# "test-object.c",
+# "test-readpixels.c",
+# "test-texture-mipmaps.c",
+# "test-texture-pixmap-x11.c",",
+# "test-texture-rectangle.c",
+# "test-vertex-buffer-contiguous.c",
+# "test-vertex-buffer-interleved.c",
+# "test-vertex-buffer-mutability.c",
+#]
+
+cogl_test_conformance_includes = [
+ cogl_includepath,
+ cogl_test_fixtures_includepath,
+]
+
+libmutter_cogl_test_conformance = executable('test-conformance',
+ sources: cogl_test_conformance_sources,
+ c_args: cogl_debug_c_args + [
+ '-DCOGL_ENABLE_EXPERIMENTAL_API',
+ '-DCOGL_DISABLE_DEPRECATED',
+ '-DCOGL_DISABLE_DEPRECATION_WARNINGS',
+ '-DTESTS_DATADIR="@0@/tests/data"'.format(cogl_srcdir),
+ ],
+ include_directories: cogl_test_conformance_includes,
+ dependencies: [
+ cogl_deps,
+ libmutter_cogl_path_dep,
+ libmutter_cogl_test_fixtures_dep
+ ],
+ link_with: [libmutter_cogl],
+ install: false,
+)
+
+find_unit_tests = find_program('meson/find-conform-unit-tests.sh')
+cogl_conform_unit_tests = custom_target('cogl-tests-conform-unit-tests',
+ output: 'unit-tests',
+ input: 'test-conform-main.c',
+ command: [find_unit_tests, '@INPUT@', '@OUTPUT@'],
+ install: false,
+)
+
+test('cogl/conform', cogl_run_tests,
+ args: [
+ cogl_config_env,
+ libmutter_cogl_test_conformance,
+ cogl_conform_unit_tests
+ ],
+ is_parallel: false,
+ timeout: 60,
+)
diff --git a/cogl/tests/conform/meson/find-conform-unit-tests.sh
b/cogl/tests/conform/meson/find-conform-unit-tests.sh
new file mode 100755
index 000000000..64ba14183
--- /dev/null
+++ b/cogl/tests/conform/meson/find-conform-unit-tests.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+inputfile="$1"
+outputfile="$2"
+
+echo > "$outputfile"
+
+sed -n -e 's/^ \{1,\}ADD_TEST *( *\([a-zA-Z0-9_]\{1,\}\).*/\1/p' "$1" | while read test; do
+ echo $test >> $outputfile
+done
diff --git a/cogl/tests/meson.build b/cogl/tests/meson.build
new file mode 100644
index 000000000..a1853774a
--- /dev/null
+++ b/cogl/tests/meson.build
@@ -0,0 +1,14 @@
+cogl_run_tests = find_program('run-tests.sh')
+
+cdata = configuration_data()
+cdata.set('HAVE_GL', have_gl.to_int())
+cdata.set('HAVE_GLES2', have_gles2.to_int())
+
+cogl_config_env = configure_file(
+ input: 'config.env.in',
+ output: 'config.env',
+ configuration: cdata)
+
+subdir('conform')
+subdir('unit')
+subdir('micro-perf')
diff --git a/cogl/tests/micro-perf/meson.build b/cogl/tests/micro-perf/meson.build
new file mode 100644
index 000000000..d5fc356e7
--- /dev/null
+++ b/cogl/tests/micro-perf/meson.build
@@ -0,0 +1,15 @@
+cogl_test_journal_sources = [
+ 'test-journal.c',
+]
+
+cogl_test_journal = executable('test-journal',
+ sources: cogl_test_journal_sources,
+ c_args: cogl_debug_c_args + [
+ '-DCOGL_DISABLE_DEPRECATED',
+ '-DTESTS_DATADIR="@0@"'.format(join_paths(cogl_srcdir, 'tests/data')),
+ ],
+ include_directories: cogl_includepath,
+ dependencies: cogl_deps,
+ link_with: [libmutter_cogl],
+ install: false,
+)
diff --git a/cogl/tests/unit/meson.build b/cogl/tests/unit/meson.build
new file mode 100644
index 000000000..85eb8bfb4
--- /dev/null
+++ b/cogl/tests/unit/meson.build
@@ -0,0 +1,38 @@
+cogl_test_unit_sources = [
+ 'test-unit-main.c',
+]
+
+cogl_test_unit_includes = [
+ cogl_includepath,
+ cogl_test_fixtures_includepath,
+]
+
+libmutter_cogl_test_unit = executable('test-unit',
+ sources: cogl_test_unit_sources,
+ c_args: cogl_debug_c_args + [
+ '-DCOGL_DISABLE_DEPRECATED',
+ '-DCOGL_COMPILATION',
+ '-DTESTS_DATADIR="@0@/tests/data"'.format(cogl_srcdir),
+ ],
+ include_directories: cogl_test_unit_includes,
+ dependencies: [cogl_deps, libmutter_cogl_test_fixtures_dep],
+ link_with: [libmutter_cogl, libmutter_cogl_path],
+ install: false,
+)
+
+find_unit_tests = find_program('meson/find-unit-tests.sh')
+cogl_unit_unit_tests = custom_target('cogl-tests-unit-unit-tests',
+ output: 'unit-tests',
+ input: libmutter_cogl,
+ command: [find_unit_tests, '@INPUT@', '@OUTPUT@'],
+ install: false,
+)
+
+test('cogl/unit', cogl_run_tests,
+ args: [
+ cogl_config_env,
+ libmutter_cogl_test_unit,
+ cogl_unit_unit_tests
+ ],
+ is_parallel: false,
+)
diff --git a/cogl/tests/unit/meson/find-unit-tests.sh b/cogl/tests/unit/meson/find-unit-tests.sh
new file mode 100755
index 000000000..c06aebc97
--- /dev/null
+++ b/cogl/tests/unit/meson/find-unit-tests.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+inputfile="$1"
+outputfile="$2"
+
+nm "$inputfile" | grep '[DR] _\?unit_test_'|sed 's/.\+ [DR] _\?//' > "$outputfile"
diff --git a/config.h.meson b/config.h.meson
new file mode 100644
index 000000000..af935cdeb
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,65 @@
+/* The prefix for our gettext translation domains. */
+#mesondefine GETTEXT_PACKAGE
+
+/* Version number of package */
+#mesondefine VERSION
+
+/* Version number of package */
+#mesondefine PACKAGE_VERSION
+
+/* Search path for plugins */
+#mesondefine MUTTER_PLUGIN_DIR
+
+/* */
+#mesondefine MUTTER_LOCALEDIR
+
+/* */
+#mesondefine MUTTER_LIBEXECDIR
+
+/* */
+#mesondefine MUTTER_PKGDATADIR
+
+/* Defined if EGL support is enabled */
+#mesondefine HAVE_EGL
+
+/* Defined if EGLDevice support is enabled */
+#mesondefine HAVE_EGL_DEVICE
+
+/* Defined if EGLStream support is enabled */
+#mesondefine HAVE_WAYLAND_EGLSTREAM
+
+/* Building with libcanberra for playing sounds */
+#mesondefine HAVE_LIBCANBERRA
+
+/* Building with gudev for device type detection */
+#mesondefine HAVE_LIBGUDEV
+
+/* Building with libwacom for advanced tablet management */
+#mesondefine HAVE_LIBWACOM
+
+/* Define if you want to enable the native (KMS) backend based on systemd */
+#mesondefine HAVE_NATIVE_BACKEND
+
+/* Define if you want to enable Wayland support */
+#mesondefine HAVE_WAYLAND
+
+/* Defined if screen cast and remote desktop support is enabled */
+#mesondefine HAVE_REMOTE_DESKTOP
+
+/* Building with SM support */
+#mesondefine HAVE_SM
+
+/* Building with startup notification support */
+#mesondefine HAVE_STARTUP_NOTIFICATION
+
+/* Path to Xwayland executable */
+#mesondefine XWAYLAND_PATH
+
+/* Xwayland applications allowed to issue keyboard grabs */
+#mesondefine XWAYLAND_GRAB_DEFAULT_ACCESS_RULES
+
+/* XKB base prefix */
+#mesondefine XKB_BASE
+
+/* Default rules for allowing Xwayland grabs */
+#mesondefine XWAYLAND_GRAB_DEFAULT_ACCESS_RULES
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 000000000..dffc8d935
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,60 @@
+msgfmt = find_program('msgfmt')
+
+custom_target('mutter.desktop',
+ input: 'mutter.desktop.in',
+ output: 'mutter.desktop',
+ command: [
+ msgfmt,
+ '--desktop', '--template',
+ '@INPUT@',
+ '-d', join_paths(top_srcdir, 'po'),
+ '-o', '@OUTPUT@'
+ ],
+ install: true,
+ install_dir: join_paths(datadir, 'applications'),
+)
+
+# Unconditionally use this dir to avoid a circular dep with gnomecc
+gnome_keybindings_keysdir = join_paths(datadir, 'gnome-control-center/keybindings')
+
+keybinding_xml_files = [
+ '50-mutter-navigation.xml',
+ '50-mutter-system.xml',
+ '50-mutter-windows.xml',
+]
+
+if have_wayland
+ keybinding_xml_files += [
+ '50-mutter-wayland.xml',
+ ]
+endif
+
+install_data(keybinding_xml_files,
+ install_dir: gnome_keybindings_keysdir,
+)
+
+xwayland_grab_default_access_rules = get_option('xwayland_grab_default_access_rules')
+
+gschema_config = configuration_data()
+gschema_config.set('GETTEXT_DOMAIN', meson.project_name())
+gschema_config.set('XWAYLAND_GRAB_DEFAULT_ACCESS_RULES',
+ xwayland_grab_default_access_rules)
+
+schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
+configure_file(
+ input: 'org.gnome.mutter.gschema.xml.in',
+ output: 'org.gnome.mutter.gschema.xml',
+ configuration: gschema_config,
+ install_dir: schemadir
+)
+
+configure_file(
+ input: 'org.gnome.mutter.wayland.gschema.xml.in',
+ output: 'org.gnome.mutter.wayland.gschema.xml',
+ configuration: gschema_config,
+ install_dir: schemadir
+)
+
+install_data(['mutter-schemas.convert'],
+ install_dir: join_paths(datadir, 'GConf/gsettings'),
+)
diff --git a/doc/man/meson.build b/doc/man/meson.build
new file mode 100644
index 000000000..dd543269d
--- /dev/null
+++ b/doc/man/meson.build
@@ -0,0 +1 @@
+install_man('mutter.1')
diff --git a/meson.build b/meson.build
new file mode 100644
index 000000000..e9fb865ab
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,317 @@
+project('mutter', 'c',
+ version: '3.30.1',
+ meson_version: '>= 0.46.0',
+ license: 'GPLv2+'
+)
+
+mutter_plugin_api_version = '3'
+
+libmutter_api_version = '3'
+
+# generic version requirements
+glib_req = '>= 2.53.2'
+gi_req = '>= 0.9.5'
+gtk3_req = '>= 3.19.8'
+gdk_pixbuf_req = '>= 2.0'
+uprof_req = '>= 0.3'
+pango_req = '>= 1.2.0'
+cairo_req = '>= 1.10.0'
+pangocairo_req = '>= 1.20'
+gsettings_desktop_schemas_req = '>= 3.21.4'
+json_glib_req = '>= 0.12.0'
+upower_glib_req = '>= 0.99.0'
+xcomposite_req = '>= 0.4'
+xkbcommon_req = '>= 0.4.3'
+xfixes_req = '>= 3'
+xi_req = '>= 1.6.99.1'
+xrandr_req = '>= 1.5.0'
+libstartup_notification_req = '>= 0.7'
+libcanberra_gtk3_req = '>= 0.26'
+libwacom_req = '>= 0.13'
+atk_req = '>= 2.5.3'
+
+# optional version requirements
+udev_req = '>= 232'
+
+# wayland version requirements
+wayland_server_req = '>= 1.13.0'
+wayland_protocols_req = '>= 1.16'
+
+# native backend version requirements
+libinput_req = '>= 1.4'
+gbm_req = '>= 10.3'
+
+# screen cast version requirements
+libpipewire_req = '>= 0.2.2'
+
+gnome = import('gnome')
+pkg = import('pkgconfig')
+i18n = import('i18n')
+cc = meson.get_compiler('c')
+
+prefix = get_option('prefix')
+
+bindir = join_paths(prefix, get_option('bindir'))
+datadir = join_paths(prefix, get_option('datadir'))
+libdir = join_paths(prefix, get_option('libdir'))
+libexecdir = join_paths(prefix, get_option('libexecdir'))
+includedir = join_paths(prefix, get_option('includedir'))
+sysconfdir = get_option('sysconfdir')
+
+pkgname = '@0@-@1@'.format(meson.project_name(), libmutter_api_version)
+
+pkgdatadir = join_paths(datadir, pkgname)
+pkglibdir = join_paths(libdir, pkgname)
+pkgincludedir = join_paths(includedir, pkgname)
+
+gettext_package = meson.project_name()
+localedir = join_paths(datadir, 'locale')
+
+top_srcdir = meson.current_source_dir()
+builddir = meson.current_build_dir()
+
+m_dep = cc.find_library('m', required: true)
+x11_dep = dependency('x11')
+gtk3_dep = dependency('gtk+-3.0', version: gtk3_req)
+gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0')
+pango_dep = dependency('pango', version: pango_req)
+cairo_dep = dependency('cairo', version: cairo_req)
+cairo_gobject_dep = dependency('cairo-gobject', version: cairo_req)
+pangocairo_dep = dependency('pangocairo', version: pangocairo_req)
+gsettings_desktop_schemas_dep = dependency('gsettings-desktop-schemas',
+ version: gsettings_desktop_schemas_req)
+glib_dep = dependency('glib-2.0', version: glib_req)
+gio_dep = dependency('gio-unix-2.0', version: glib_req)
+gio_unix_dep = dependency('gio-unix-2.0', version: glib_req)
+gobject_dep = dependency('gobject-2.0', version: glib_req)
+gthread_dep = dependency('gobject-2.0', version: glib_req)
+gmodule_no_export_dep = dependency('gmodule-no-export-2.0', version: glib_req)
+gnome_settings_daemon_dep = dependency('gnome-settings-daemon')
+json_glib_dep = dependency('json-glib-1.0', version: json_glib_req)
+gnome_desktop_dep = dependency('gnome-desktop-3.0')
+xcomposite_dep = dependency('xcomposite', version: xcomposite_req)
+xcursor_dep = dependency('xcursor')
+xdamage_dep = dependency('xdamage')
+xext_dep = dependency('xext')
+xfixes_dep = dependency('xfixes', version: xfixes_req)
+xi_dep = dependency('xi', version: xi_req)
+xtst_dep = dependency('xtst')
+xkbfile_dep = dependency('xkbfile')
+xkeyboard_config_dep = dependency('xkeyboard-config')
+xkbcommon_dep = dependency('xkbcommon', version: xkbcommon_req)
+xkbcommon_x11_dep = dependency('xkbcommon-x11')
+xrender_dep = dependency('xrender')
+x11_xcb_dep = dependency('x11-xcb')
+xrandr_dep = dependency('xrandr', version: xrandr_req)
+xcb_randr_dep = dependency('xcb-randr')
+xcb_res_dep = dependency('xcb-res')
+xinerama_dep = dependency('xinerama')
+ice_dep = dependency('ice')
+atk_dep = dependency('atk', version: atk_req)
+
+# For now always require X11 support
+have_x11 = true
+
+have_gl = get_option('opengl')
+if have_gl
+ gl_dep = dependency('gl')
+ gl_libname = get_option('opengl_libname')
+endif
+
+have_egl = get_option('egl')
+if have_egl
+ egl_dep = dependency('egl')
+endif
+
+have_glx = get_option('glx')
+if have_glx
+ if not have_gl
+ error('GLX support requires OpenGL to be enabled')
+ endif
+endif
+
+have_egl_xlib = have_egl and have_x11
+
+have_gles2 = get_option('gles2')
+if have_gles2
+ gles2_dep = dependency('glesv2')
+ gles2_libname = get_option('gles2_libname')
+
+ if not have_egl
+ error('GLESv2 support requires EGL to be enabled')
+ endif
+endif
+
+have_wayland = get_option('wayland')
+if have_wayland
+ wayland_server_dep = dependency('wayland-server', version: wayland_server_req)
+ wayland_protocols_dep = dependency('wayland-protocols',
+ version: wayland_protocols_req)
+ wayland_egl_dep = dependency('wayland-egl')
+
+ if not have_egl
+ error('Wayland support requires EGL to be enabled')
+ endif
+endif
+
+have_libgudev = get_option('udev')
+if have_libgudev
+ libudev_dep = dependency('libudev', version: udev_req)
+ gudev_dep = dependency('gudev-1.0', version: udev_req)
+endif
+
+have_native_backend = get_option('native_backend')
+if have_native_backend
+ libdrm_dep = dependency('libdrm')
+ libgbm_dep = dependency('gbm', version: gbm_req)
+ libinput_dep = dependency('libinput', version: libinput_req)
+
+ libsystemd_dep = dependency('libsystemd')
+ if libsystemd_dep.found()
+ logind_provider_dep = libsystemd_dep
+ else
+ logind_provider_dep = dependency('libelogind')
+ endif
+
+ if not have_egl
+ error('The native backend requires EGL to be enabled')
+ endif
+
+ if not have_gles2
+ error('The native backend requires GLESv2 to be enabled')
+ endif
+
+ if not have_libgudev
+ error('The native backend requires udev to be enabled')
+ endif
+endif
+
+have_egl_device = get_option('egl_device')
+
+have_wayland_eglstream = get_option('wayland_eglstream')
+if have_wayland_eglstream
+ wayland_eglstream_protocols_dep = dependency('wayland-eglstream-protocols')
+ dl_dep = cc.find_library('dl', required: true)
+
+ if not have_wayland
+ error('Wayland EGLStream support requires Wayland to be enabled')
+ endif
+endif
+
+have_sm = get_option('sm')
+if have_sm
+ sm_dep = dependency('sm')
+endif
+
+have_libcanberra = get_option('libcanberra')
+if have_libcanberra
+ libcanberra_gtk3_dep = dependency('libcanberra-gtk3', version: libcanberra_gtk3_req)
+endif
+
+have_libwacom = get_option('libwacom')
+if have_libwacom
+ libwacom_dep = dependency('libwacom', version: libwacom_req)
+endif
+
+have_pango_ft2 = get_option('pango_ft2')
+if have_pango_ft2
+ pangoft2_dep = dependency('pangoft2')
+endif
+
+have_startup_notification = get_option('startup_notification')
+if have_startup_notification
+ libstartup_notification_dep = dependency('libstartup-notification-1.0',
+ version: libstartup_notification_req)
+endif
+
+have_remote_desktop = get_option('remote_desktop')
+if have_remote_desktop
+ libpipewire_dep = dependency('libpipewire-0.2', version: libpipewire_req)
+endif
+
+have_introspection = get_option('introspection')
+if have_introspection
+ gobject_introspection_dep = dependency('gobject-introspection-1.0')
+endif
+
+have_cogl_tests = get_option('cogl_tests')
+have_clutter_tests = get_option('clutter_tests')
+
+have_tests = get_option('tests')
+if have_tests
+ if not have_wayland
+ error('Tests require Wayland to be enabled')
+ endif
+endif
+
+required_functions = [
+ 'ffs',
+ 'clz',
+]
+foreach function : required_functions
+ if not cc.has_function(function)
+ error('Required function ' + function + ' missing')
+ endif
+endforeach
+
+add_project_arguments('-D_GNU_SOURCE', language: 'c')
+
+debug_c_args = []
+buildtype = get_option('buildtype')
+if buildtype.startswith('debug')
+ debug_c_args += '-DG_ENABLE_DEBUG'
+endif
+add_project_arguments(debug_c_args, language: 'c')
+
+cc.compiles('void main (void) { __builtin_ffsl (0); __builtin_popcountl (0); }')
+
+cdata = configuration_data()
+cdata.set_quoted('GETTEXT_PACKAGE', gettext_package)
+cdata.set_quoted('VERSION', meson.project_version())
+cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
+
+cdata.set('HAVE_EGL', have_egl)
+cdata.set('HAVE_WAYLAND', have_wayland)
+cdata.set('HAVE_NATIVE_BACKEND', have_native_backend)
+cdata.set('HAVE_REMOTE_DESKTOP', have_remote_desktop)
+cdata.set('HAVE_EGL_DEVICE', have_egl_device)
+cdata.set('HAVE_WAYLAND_EGLSTREAM', have_wayland_eglstream)
+cdata.set('HAVE_LIBGUDEV', have_libgudev)
+cdata.set('HAVE_LIBCANBERRA', have_libcanberra)
+cdata.set('HAVE_LIBWACOM', have_libwacom)
+cdata.set('HAVE_SM', have_sm)
+cdata.set('HAVE_STARTUP_NOTIFICATION', have_startup_notification)
+cdata.set('HAVE_INTROSPECTION', have_introspection)
+
+xkb_base = xkeyboard_config_dep.get_pkgconfig_variable('xkb_base')
+cdata.set_quoted('XKB_BASE', xkb_base)
+
+xwayland_path = get_option('xwayland_path')
+if xwayland_path == ''
+ xwayland_path = find_program('Xwayland').path()
+endif
+cdata.set_quoted('XWAYLAND_PATH', xwayland_path)
+
+xwayland_grab_default_access_rules = get_option('xwayland_grab_default_access_rules')
+cdata.set_quoted('XWAYLAND_GRAB_DEFAULT_ACCESS_RULES',
+ xwayland_grab_default_access_rules)
+
+cdata.set_quoted('MUTTER_PLUGIN_DIR', join_paths(pkglibdir, 'plugins'))
+cdata.set_quoted('MUTTER_LOCALEDIR', localedir)
+cdata.set_quoted('MUTTER_LIBEXECDIR', libexecdir)
+cdata.set_quoted('MUTTER_PKGDATADIR', pkgdatadir)
+
+config_h = configure_file(
+ input: 'config.h.meson',
+ output: 'config.h',
+ configuration: cdata
+)
+
+top_includepath = include_directories('.')
+
+subdir('cogl')
+subdir('clutter')
+subdir('data')
+subdir('src')
+subdir('po')
+subdir('doc/man')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 000000000..a0924faf1
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,142 @@
+option('opengl',
+ type: 'boolean',
+ value: true,
+ description: 'Enable OpenGL'
+)
+
+option('opengl_libname',
+ type: 'string',
+ value: 'libGL.so.1',
+ description: 'OpenGL library file name'
+)
+
+option('gles2_libname',
+ type: 'string',
+ value: 'libGLESv2.so',
+ description: 'GLESv2 library file name'
+)
+
+option('gles2',
+ type: 'boolean',
+ value: true,
+ description: 'Enable GLES2 support'
+)
+
+option('egl',
+ type: 'boolean',
+ value: true,
+ description: 'Enable EGL support'
+)
+option('glx',
+ type: 'boolean',
+ value: true,
+ description: 'Enable GLX support'
+)
+
+option('wayland',
+ type: 'boolean',
+ value: true,
+ description: 'Enable Wayland support'
+)
+
+option('native_backend',
+ type: 'boolean',
+ value: true,
+ description: 'Enable the native backend'
+)
+
+option('remote_desktop',
+ type: 'boolean',
+ value: true,
+ description: 'Enable remote desktop and screen cast support'
+)
+
+option('egl_device',
+ type: 'boolean',
+ value: false,
+ description: 'Enable EGLDevice and EGLStream renderer support'
+)
+
+option('wayland_eglstream',
+ type: 'boolean',
+ value: false,
+ description: 'Enable Wayland EGLStream support client support'
+)
+
+option('udev',
+ type: 'boolean',
+ value: true,
+ description: 'Enable udev support when using the X11 backend'
+)
+
+option('libwacom',
+ type: 'boolean',
+ value: true,
+ description: 'Enable libwacom support'
+)
+
+option('pango_ft2',
+ type: 'boolean',
+ value: true,
+ description: 'Enable PangoFt2 support'
+)
+
+option('libcanberra',
+ type: 'boolean',
+ value: true,
+ description: 'Enable libcanberra support'
+)
+
+option('startup_notification',
+ type: 'boolean',
+ value: true,
+ description: 'Enable startup notification support'
+)
+
+option('sm',
+ type: 'boolean',
+ value: true,
+ description: 'Enable X11 session management support'
+)
+
+option('introspection',
+ type: 'boolean',
+ value: true,
+ description: 'Enable GObject introspection'
+)
+
+option('cogl_tests',
+ type: 'boolean',
+ value: true,
+ description: 'Enable cogl tests'
+)
+
+option('clutter_tests',
+ type: 'boolean',
+ value: true,
+ description: 'Enable clutter tests'
+)
+
+option('tests',
+ type: 'boolean',
+ value: true,
+ description: 'Enable mutter tests'
+)
+
+option('verbose',
+ type: 'boolean',
+ value: true,
+ description: 'Enable verbose logging ability'
+)
+
+option('xwayland_path',
+ type: 'string',
+ value: '',
+ description: 'Path to Xwayland executable'
+)
+
+option('xwayland_grab_default_access_rules',
+ type: 'string',
+ value: 'gnome-boxes,remote-viewer,virt-viewer,virt-manager,vinagre,vncviewer,Xephyr',
+ description: 'Comma delimited list of applications ressources or class allowed to issue X11 grabs in
Xwayland'
+)
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 000000000..e9b77d79b
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(meson.project_name(), preset: 'glib')
diff --git a/src/compositor/plugins/meson.build b/src/compositor/plugins/meson.build
new file mode 100644
index 000000000..9dd06814d
--- /dev/null
+++ b/src/compositor/plugins/meson.build
@@ -0,0 +1,20 @@
+default_plugin_c_args = [
+ '-fPIC',
+ '-DG_LOG_DOMAIN="mutter"',
+ '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
+]
+
+default_plugin = shared_module('default',
+ sources: ['default.c'],
+ include_directories: mutter_includes,
+ c_args: default_plugin_c_args,
+ dependencies: [
+ glib_dep,
+ gtk3_dep,
+ json_glib_dep,
+ gsettings_desktop_schemas_dep,
+ libmutter_clutter_dep,
+ ],
+ install_dir: join_paths(pkglibdir, 'plugins'),
+ install: true,
+)
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 000000000..1e5a6ac6c
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,815 @@
+mutter_includedir = join_paths(pkgincludedir, 'meta')
+
+mutter_includes = [
+ include_directories('.'),
+ top_includepath,
+ clutter_includepath,
+ cogl_includepath,
+]
+
+mutter_lib_deps = [
+ m_dep,
+]
+
+mutter_pkg_deps = [
+ cairo_dep,
+ gio_unix_dep,
+ glib_dep,
+ gmodule_no_export_dep,
+ gnome_desktop_dep,
+ gsettings_desktop_schemas_dep,
+ gnome_settings_daemon_dep,
+ gtk3_dep,
+ json_glib_dep,
+ pango_dep,
+ xkbcommon_dep,
+]
+
+if have_gl
+ mutter_pkg_deps += [
+ gl_dep,
+ ]
+endif
+
+if have_gles2
+ mutter_pkg_deps += [
+ gles2_dep,
+ ]
+endif
+
+if have_egl
+ mutter_pkg_deps += [
+ egl_dep,
+ ]
+endif
+
+if have_libgudev
+ mutter_pkg_deps += [
+ gudev_dep,
+ libudev_dep,
+ ]
+endif
+
+if have_startup_notification
+ mutter_pkg_deps += [
+ libstartup_notification_dep,
+ ]
+endif
+
+if have_libcanberra
+ mutter_pkg_deps += [
+ libcanberra_gtk3_dep,
+ ]
+endif
+
+if have_libwacom
+ mutter_pkg_deps += [
+ libwacom_dep,
+ ]
+endif
+
+if have_remote_desktop
+ mutter_pkg_deps += [
+ libpipewire_dep,
+ ]
+endif
+
+if have_introspection
+ mutter_pkg_deps += [
+ gobject_introspection_dep,
+ ]
+endif
+
+if have_x11
+ mutter_pkg_deps += [
+ xrandr_dep,
+ x11_dep,
+ xinerama_dep,
+ xext_dep,
+ ice_dep,
+ xcomposite_dep,
+ xcursor_dep,
+ xdamage_dep,
+ xext_dep,
+ xfixes_dep,
+ xi_dep,
+ xkbfile_dep,
+ xkeyboard_config_dep,
+ xkbcommon_x11_dep,
+ xrender_dep,
+ x11_xcb_dep,
+ xcb_randr_dep,
+ xcb_res_dep,
+ ]
+
+ if have_sm
+ mutter_pkg_deps += [
+ sm_dep,
+ ]
+ endif
+endif
+
+if have_wayland
+ mutter_pkg_deps += [
+ wayland_server_dep,
+ ]
+endif
+
+if have_native_backend
+ mutter_pkg_deps += [
+ libdrm_dep,
+ libinput_dep,
+ gudev_dep,
+ libgbm_dep,
+ logind_provider_dep,
+ ]
+endif
+
+if have_wayland_eglstream
+ mutter_lib_deps += [
+ dl_dep,
+ ]
+ mutter_pkg_deps += [
+ wayland_eglstream_protocols_dep,
+ ]
+endif
+
+mutter_deps = [
+ mutter_pkg_deps,
+ mutter_lib_deps,
+]
+
+mutter_c_args = [
+ '-DCLUTTER_ENABLE_COMPOSITOR_API',
+ '-DCLUTTER_ENABLE_EXPERIMENTAL_API',
+ '-DCOGL_ENABLE_EXPERIMENTAL_API',
+ '-DCOGL_ENABLE_EXPERIMENTAL_2_0_API',
+ '-DCOGL_ENABLE_MUTTER_API',
+ '-DCLUTTER_DISABLE_DEPRECATION_WARNINGS',
+ '-DCOGL_DISABLE_DEPRECATION_WARNINGS',
+ '-DG_LOG_DOMAIN="mutter"',
+ '-DSN_API_NOT_YET_FROZEN=1',
+ '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
+]
+
+if get_option('verbose')
+ mutter_c_args += [
+ '-DWITH_VERBOSE_MODE'
+ ]
+endif
+
+mutter_sources = [
+ 'backends/edid.h',
+ 'backends/edid-parse.c',
+ 'backends/gsm-inhibitor-flag.h',
+ 'backends/meta-backend.c',
+ 'backends/meta-backend-private.h',
+ 'backends/meta-barrier.c',
+ 'backends/meta-barrier-private.h',
+ 'backends/meta-crtc.c',
+ 'backends/meta-crtc.h',
+ 'backends/meta-cursor.c',
+ 'backends/meta-cursor.h',
+ 'backends/meta-cursor-renderer.c',
+ 'backends/meta-cursor-renderer.h',
+ 'backends/meta-cursor-sprite-xcursor.c',
+ 'backends/meta-cursor-sprite-xcursor.h',
+ 'backends/meta-cursor-tracker.c',
+ 'backends/meta-cursor-tracker-private.h',
+ 'backends/meta-display-config-shared.h',
+ 'backends/meta-dnd-private.h',
+ 'backends/meta-gpu.c',
+ 'backends/meta-gpu.h',
+ 'backends/meta-idle-monitor.c',
+ 'backends/meta-idle-monitor-dbus.c',
+ 'backends/meta-idle-monitor-dbus.h',
+ 'backends/meta-idle-monitor-private.h',
+ 'backends/meta-input-settings.c',
+ 'backends/meta-input-settings-private.h',
+ 'backends/meta-logical-monitor.c',
+ 'backends/meta-logical-monitor.h',
+ 'backends/meta-monitor.c',
+ 'backends/meta-monitor-config-manager.c',
+ 'backends/meta-monitor-config-manager.h',
+ 'backends/meta-monitor-config-migration.c',
+ 'backends/meta-monitor-config-migration.h',
+ 'backends/meta-monitor-config-store.c',
+ 'backends/meta-monitor-config-store.h',
+ 'backends/meta-monitor.h',
+ 'backends/meta-monitor-manager.c',
+ 'backends/meta-monitor-manager-dummy.c',
+ 'backends/meta-monitor-manager-dummy.h',
+ 'backends/meta-monitor-manager-private.h',
+ 'backends/meta-orientation-manager.c',
+ 'backends/meta-orientation-manager.h',
+ 'backends/meta-output.c',
+ 'backends/meta-output.h',
+ 'backends/meta-pointer-constraint.c',
+ 'backends/meta-pointer-constraint.h',
+ 'backends/meta-remote-access-controller-private.h',
+ 'backends/meta-remote-access-controller.c',
+ 'backends/meta-renderer.c',
+ 'backends/meta-renderer.h',
+ 'backends/meta-renderer-view.c',
+ 'backends/meta-renderer-view.h',
+ 'backends/meta-settings.c',
+ 'backends/meta-settings-private.h',
+ 'backends/meta-stage.c',
+ 'backends/meta-stage-private.h',
+ 'backends/x11/cm/meta-backend-x11-cm.c',
+ 'backends/x11/cm/meta-backend-x11-cm.h',
+ 'backends/x11/cm/meta-cursor-sprite-xfixes.c',
+ 'backends/x11/cm/meta-cursor-sprite-xfixes.h',
+ 'backends/x11/cm/meta-renderer-x11-cm.c',
+ 'backends/x11/cm/meta-renderer-x11-cm.h',
+ 'backends/x11/meta-backend-x11.c',
+ 'backends/x11/meta-backend-x11.h',
+ 'backends/x11/meta-barrier-x11.c',
+ 'backends/x11/meta-barrier-x11.h',
+ 'backends/x11/meta-clutter-backend-x11.c',
+ 'backends/x11/meta-clutter-backend-x11.h',
+ 'backends/x11/meta-crtc-xrandr.c',
+ 'backends/x11/meta-crtc-xrandr.h',
+ 'backends/x11/meta-cursor-renderer-x11.c',
+ 'backends/x11/meta-cursor-renderer-x11.h',
+ 'backends/x11/meta-gpu-xrandr.c',
+ 'backends/x11/meta-gpu-xrandr.h',
+ 'backends/x11/meta-input-settings-x11.c',
+ 'backends/x11/meta-input-settings-x11.h',
+ 'backends/x11/meta-monitor-manager-xrandr.c',
+ 'backends/x11/meta-monitor-manager-xrandr.h',
+ 'backends/x11/meta-output-xrandr.c',
+ 'backends/x11/meta-output-xrandr.h',
+ 'backends/x11/meta-renderer-x11.c',
+ 'backends/x11/meta-renderer-x11.h',
+ 'backends/x11/meta-stage-x11-nested.c',
+ 'backends/x11/meta-stage-x11-nested.h',
+ 'backends/x11/nested/meta-backend-x11-nested.c',
+ 'backends/x11/nested/meta-backend-x11-nested.h',
+ 'backends/x11/nested/meta-cursor-renderer-x11-nested.c',
+ 'backends/x11/nested/meta-cursor-renderer-x11-nested.h',
+ 'backends/x11/nested/meta-renderer-x11-nested.c',
+ 'backends/x11/nested/meta-renderer-x11-nested.h',
+ 'compositor/clutter-utils.c',
+ 'compositor/clutter-utils.h',
+ 'compositor/cogl-utils.c',
+ 'compositor/cogl-utils.h',
+ 'compositor/compositor.c',
+ 'compositor/compositor-private.h',
+ 'compositor/meta-background-actor.c',
+ 'compositor/meta-background-actor-private.h',
+ 'compositor/meta-background.c',
+ 'compositor/meta-background-group.c',
+ 'compositor/meta-background-image.c',
+ 'compositor/meta-background-private.h',
+ 'compositor/meta-cullable.c',
+ 'compositor/meta-cullable.h',
+ 'compositor/meta-dnd-actor.c',
+ 'compositor/meta-dnd-actor-private.h',
+ 'compositor/meta-dnd.c',
+ 'compositor/meta-feedback-actor.c',
+ 'compositor/meta-feedback-actor-private.h',
+ 'compositor/meta-module.c',
+ 'compositor/meta-module.h',
+ 'compositor/meta-plugin.c',
+ 'compositor/meta-plugin-manager.c',
+ 'compositor/meta-plugin-manager.h',
+ 'compositor/meta-shadow-factory.c',
+ 'compositor/meta-shaped-texture.c',
+ 'compositor/meta-shaped-texture-private.h',
+ 'compositor/meta-surface-actor.c',
+ 'compositor/meta-surface-actor.h',
+ 'compositor/meta-surface-actor-x11.c',
+ 'compositor/meta-surface-actor-x11.h',
+ 'compositor/meta-sync-ring.c',
+ 'compositor/meta-sync-ring.h',
+ 'compositor/meta-texture-rectangle.c',
+ 'compositor/meta-texture-rectangle.h',
+ 'compositor/meta-texture-tower.c',
+ 'compositor/meta-texture-tower.h',
+ 'compositor/meta-window-actor.c',
+ 'compositor/meta-window-actor-private.h',
+ 'compositor/meta-window-group.c',
+ 'compositor/meta-window-group-private.h',
+ 'compositor/meta-window-shape.c',
+ 'compositor/region-utils.c',
+ 'compositor/region-utils.h',
+ 'core/bell.c',
+ 'core/bell.h',
+ 'core/boxes.c',
+ 'core/boxes-private.h',
+ 'core/constraints.c',
+ 'core/constraints.h',
+ 'core/core.c',
+ 'core/core.h',
+ 'core/delete.c',
+ 'core/display.c',
+ 'core/display-private.h',
+ 'core/edge-resistance.c',
+ 'core/edge-resistance.h',
+ 'core/events.c',
+ 'core/events.h',
+ 'core/frame.c',
+ 'core/frame.h',
+ 'core/keybindings.c',
+ 'core/keybindings-private.h',
+ 'core/main.c',
+ 'core/main-private.h',
+ 'core/meta-accel-parse.c',
+ 'core/meta-accel-parse.h',
+ 'core/meta-border.c',
+ 'core/meta-border.h',
+ 'core/meta-close-dialog.c',
+ 'core/meta-close-dialog-default.c',
+ 'core/meta-close-dialog-default-private.h',
+ 'core/meta-fraction.c',
+ 'core/meta-fraction.h',
+ 'core/meta-gesture-tracker.c',
+ 'core/meta-gesture-tracker-private.h',
+ 'core/meta-inhibit-shortcuts-dialog.c',
+ 'core/meta-inhibit-shortcuts-dialog-default.c',
+ 'core/meta-inhibit-shortcuts-dialog-default-private.h',
+ 'core/meta-workspace-manager.c',
+ 'core/meta-workspace-manager-private.h',
+ 'core/place.c',
+ 'core/place.h',
+ 'core/prefs.c',
+ 'core/restart.c',
+ 'core/stack.c',
+ 'core/stack.h',
+ 'core/stack-tracker.c',
+ 'core/stack-tracker.h',
+ 'core/startup-notification.c',
+ 'core/startup-notification-private.h',
+ 'core/util.c',
+ 'core/util-private.h',
+ 'core/window.c',
+ 'core/window-private.h',
+ 'core/workspace.c',
+ 'core/workspace-private.h',
+ 'ui/frames.c',
+ 'ui/frames.h',
+ 'ui/theme.c',
+ 'ui/theme-private.h',
+ 'ui/ui.c',
+ 'ui/ui.h',
+ 'x11/atomnames.h',
+ 'x11/events.c',
+ 'x11/events.h',
+ 'x11/group.c',
+ 'x11/group-private.h',
+ 'x11/group-props.c',
+ 'x11/group-props.h',
+ 'x11/iconcache.c',
+ 'x11/iconcache.h',
+ 'x11/meta-x11-display.c',
+ 'x11/meta-x11-display-private.h',
+ 'x11/meta-x11-errors.c',
+ 'x11/mutter-Xatomtype.h',
+ 'x11/session.c',
+ 'x11/session.h',
+ 'x11/window-props.c',
+ 'x11/window-props.h',
+ 'x11/window-x11.c',
+ 'x11/window-x11.h',
+ 'x11/window-x11-private.h',
+ 'x11/xprops.c',
+ 'x11/xprops.h',
+]
+
+if have_egl
+ mutter_sources += [
+ 'backends/meta-egl.c',
+ 'backends/meta-egl-ext.h',
+ 'backends/meta-egl.h',
+ ]
+endif
+
+if have_gles2
+ mutter_sources += [
+ 'backends/meta-gles3.c',
+ 'backends/meta-gles3.h',
+ 'backends/meta-gles3-table.h',
+ ]
+endif
+
+if have_remote_desktop
+ mutter_sources += [
+ 'backends/meta-dbus-session-watcher.c',
+ 'backends/meta-dbus-session-watcher.h',
+ 'backends/meta-remote-desktop.c',
+ 'backends/meta-remote-desktop.h',
+ 'backends/meta-remote-desktop-session.c',
+ 'backends/meta-remote-desktop-session.h',
+ 'backends/meta-screen-cast.c',
+ 'backends/meta-screen-cast.h',
+ 'backends/meta-screen-cast-monitor-stream.c',
+ 'backends/meta-screen-cast-monitor-stream.h',
+ 'backends/meta-screen-cast-monitor-stream-src.c',
+ 'backends/meta-screen-cast-monitor-stream-src.h',
+ 'backends/meta-screen-cast-session.c',
+ 'backends/meta-screen-cast-session.h',
+ 'backends/meta-screen-cast-stream.c',
+ 'backends/meta-screen-cast-stream.h',
+ 'backends/meta-screen-cast-stream-src.c',
+ 'backends/meta-screen-cast-stream-src.h',
+ ]
+endif
+
+if have_wayland
+ mutter_sources += [
+ 'compositor/meta-surface-actor-wayland.c',
+ 'compositor/meta-surface-actor-wayland.h',
+ 'wayland/meta-cursor-sprite-wayland.c',
+ 'wayland/meta-cursor-sprite-wayland.h',
+ 'wayland/meta-pointer-confinement-wayland.c',
+ 'wayland/meta-pointer-confinement-wayland.h',
+ 'wayland/meta-pointer-lock-wayland.c',
+ 'wayland/meta-pointer-lock-wayland.h',
+ 'wayland/meta-wayland-actor-surface.c',
+ 'wayland/meta-wayland-actor-surface.h',
+ 'wayland/meta-wayland-buffer.c',
+ 'wayland/meta-wayland-buffer.h',
+ 'wayland/meta-wayland.c',
+ 'wayland/meta-wayland-cursor-surface.c',
+ 'wayland/meta-wayland-cursor-surface.h',
+ 'wayland/meta-wayland-data-device.c',
+ 'wayland/meta-wayland-data-device.h',
+ 'wayland/meta-wayland-data-device-private.h',
+ 'wayland/meta-wayland-dma-buf.c',
+ 'wayland/meta-wayland-dma-buf.h',
+ 'wayland/meta-wayland-gtk-shell.c',
+ 'wayland/meta-wayland-gtk-shell.h',
+ 'wayland/meta-wayland.h',
+ 'wayland/meta-wayland-inhibit-shortcuts.c',
+ 'wayland/meta-wayland-inhibit-shortcuts-dialog.c',
+ 'wayland/meta-wayland-inhibit-shortcuts-dialog.h',
+ 'wayland/meta-wayland-inhibit-shortcuts.h',
+ 'wayland/meta-wayland-input-device.c',
+ 'wayland/meta-wayland-input-device.h',
+ 'wayland/meta-wayland-keyboard.c',
+ 'wayland/meta-wayland-keyboard.h',
+ 'wayland/meta-wayland-legacy-xdg-shell.c',
+ 'wayland/meta-wayland-legacy-xdg-shell.h',
+ 'wayland/meta-wayland-outputs.c',
+ 'wayland/meta-wayland-outputs.h',
+ 'wayland/meta-wayland-pointer.c',
+ 'wayland/meta-wayland-pointer-constraints.c',
+ 'wayland/meta-wayland-pointer-constraints.h',
+ 'wayland/meta-wayland-pointer-gesture-pinch.c',
+ 'wayland/meta-wayland-pointer-gesture-pinch.h',
+ 'wayland/meta-wayland-pointer-gestures.c',
+ 'wayland/meta-wayland-pointer-gestures.h',
+ 'wayland/meta-wayland-pointer-gesture-swipe.c',
+ 'wayland/meta-wayland-pointer-gesture-swipe.h',
+ 'wayland/meta-wayland-pointer.h',
+ 'wayland/meta-wayland-popup.c',
+ 'wayland/meta-wayland-popup.h',
+ 'wayland/meta-wayland-private.h',
+ 'wayland/meta-wayland-region.c',
+ 'wayland/meta-wayland-region.h',
+ 'wayland/meta-wayland-seat.c',
+ 'wayland/meta-wayland-seat.h',
+ 'wayland/meta-wayland-shell-surface.c',
+ 'wayland/meta-wayland-shell-surface.h',
+ 'wayland/meta-wayland-subsurface.c',
+ 'wayland/meta-wayland-subsurface.h',
+ 'wayland/meta-wayland-surface.c',
+ 'wayland/meta-wayland-surface.h',
+ 'wayland/meta-wayland-tablet.c',
+ 'wayland/meta-wayland-tablet-cursor-surface.c',
+ 'wayland/meta-wayland-tablet-cursor-surface.h',
+ 'wayland/meta-wayland-tablet.h',
+ 'wayland/meta-wayland-tablet-manager.c',
+ 'wayland/meta-wayland-tablet-manager.h',
+ 'wayland/meta-wayland-tablet-pad.c',
+ 'wayland/meta-wayland-tablet-pad-group.c',
+ 'wayland/meta-wayland-tablet-pad-group.h',
+ 'wayland/meta-wayland-tablet-pad.h',
+ 'wayland/meta-wayland-tablet-pad-ring.c',
+ 'wayland/meta-wayland-tablet-pad-ring.h',
+ 'wayland/meta-wayland-tablet-pad-strip.c',
+ 'wayland/meta-wayland-tablet-pad-strip.h',
+ 'wayland/meta-wayland-tablet-seat.c',
+ 'wayland/meta-wayland-tablet-seat.h',
+ 'wayland/meta-wayland-tablet-tool.c',
+ 'wayland/meta-wayland-tablet-tool.h',
+ 'wayland/meta-wayland-text-input.c',
+ 'wayland/meta-wayland-text-input.h',
+ 'wayland/meta-wayland-text-input-legacy.c',
+ 'wayland/meta-wayland-text-input-legacy.h',
+ 'wayland/meta-wayland-touch.c',
+ 'wayland/meta-wayland-touch.h',
+ 'wayland/meta-wayland-types.h',
+ 'wayland/meta-wayland-versions.h',
+ 'wayland/meta-wayland-wl-shell.c',
+ 'wayland/meta-wayland-wl-shell.h',
+ 'wayland/meta-wayland-xdg-foreign.c',
+ 'wayland/meta-wayland-xdg-foreign.h',
+ 'wayland/meta-wayland-xdg-shell.c',
+ 'wayland/meta-wayland-xdg-shell.h',
+ 'wayland/meta-window-wayland.c',
+ 'wayland/meta-window-wayland.h',
+ 'wayland/meta-window-xwayland.c',
+ 'wayland/meta-window-xwayland.h',
+ 'wayland/meta-xwayland.c',
+ 'wayland/meta-xwayland-grab-keyboard.c',
+ 'wayland/meta-xwayland-grab-keyboard.h',
+ 'wayland/meta-xwayland.h',
+ 'wayland/meta-xwayland-private.h',
+ 'wayland/meta-xwayland-selection.c',
+ 'wayland/meta-xwayland-selection-private.h',
+ ]
+endif
+
+if have_native_backend
+ mutter_sources += [
+ 'backends/native/dbus-utils.c',
+ 'backends/native/dbus-utils.h',
+ 'backends/native/meta-backend-native.c',
+ 'backends/native/meta-backend-native.h',
+ 'backends/native/meta-backend-native-private.h',
+ 'backends/native/meta-barrier-native.c',
+ 'backends/native/meta-barrier-native.h',
+ 'backends/native/meta-clutter-backend-native.c',
+ 'backends/native/meta-clutter-backend-native.h',
+ 'backends/native/meta-crtc-kms.c',
+ 'backends/native/meta-crtc-kms.h',
+ 'backends/native/meta-cursor-renderer-native.c',
+ 'backends/native/meta-cursor-renderer-native.h',
+ 'backends/native/meta-gpu-kms.c',
+ 'backends/native/meta-gpu-kms.h',
+ 'backends/native/meta-input-settings-native.c',
+ 'backends/native/meta-input-settings-native.h',
+ 'backends/native/meta-launcher.c',
+ 'backends/native/meta-launcher.h',
+ 'backends/native/meta-monitor-manager-kms.c',
+ 'backends/native/meta-monitor-manager-kms.h',
+ 'backends/native/meta-output-kms.c',
+ 'backends/native/meta-output-kms.h',
+ 'backends/native/meta-renderer-native.c',
+ 'backends/native/meta-renderer-native-gles3.c',
+ 'backends/native/meta-renderer-native-gles3.h',
+ 'backends/native/meta-renderer-native.h',
+ 'backends/native/meta-stage-native.c',
+ 'backends/native/meta-stage-native.h',
+ ]
+endif
+
+if have_wayland_eglstream
+ mutter_sources += [
+ 'wayland/meta-wayland-egl-stream.c',
+ 'wayland/meta-wayland-egl-stream.h',
+ ]
+endif
+
+mutter_built_sources = []
+
+dbus_display_config_built_sources = gnome.gdbus_codegen('meta-dbus-display-config',
+ 'org.gnome.Mutter.DisplayConfig.xml',
+ interface_prefix: 'org.gnome.Mutter.',
+ namespace: 'MetaDBus',
+ )
+mutter_built_sources += dbus_display_config_built_sources
+
+dbus_idle_monitor_built_sources = gnome.gdbus_codegen('meta-dbus-idle-monitor',
+ 'org.gnome.Mutter.IdleMonitor.xml',
+ interface_prefix: 'org.gnome.Mutter.',
+ namespace: 'MetaDBus',
+ object_manager: true,
+ )
+mutter_built_sources += dbus_idle_monitor_built_sources
+
+if have_native_backend
+ gdbus_codegen = find_program('gdbus-codegen')
+ dbus_login1_built_sources = custom_target('meta-dbus-login1',
+ input: 'org.freedesktop.login1.xml',
+ output: [
+ 'meta-dbus-login1.c',
+ 'meta-dbus-login1.h',
+ ],
+ command: [
+ gdbus_codegen,
+ '--interface-prefix', 'org.freedesktop.login1',
+ '--c-namespace', 'Login1',
+ '--generate-c-code', 'meta-dbus-login1',
+ '--output-directory', join_paths(builddir, 'src'),
+ '--c-generate-autocleanup', 'all',
+ '@INPUT@',
+ ]
+ )
+ mutter_built_sources += dbus_login1_built_sources
+endif
+
+if have_remote_desktop
+ dbus_remote_desktop_built_sources = gnome.gdbus_codegen('meta-dbus-remote-desktop',
+ 'org.gnome.Mutter.RemoteDesktop.xml',
+ interface_prefix: 'org.gnome.Mutter.',
+ namespace: 'MetaDBus',
+ )
+ mutter_built_sources += dbus_remote_desktop_built_sources
+
+ dbus_screen_cast_built_sources = gnome.gdbus_codegen('meta-dbus-screen-cast',
+ 'org.gnome.Mutter.ScreenCast.xml',
+ interface_prefix: 'org.gnome.Mutter.',
+ namespace: 'MetaDBus',
+ )
+ mutter_built_sources += dbus_screen_cast_built_sources
+endif
+
+cvt = find_program('cvt')
+
+gen_default_modes = find_program('backends/native/gen-default-modes.py')
+default_modes_h = custom_target('meta-default-modes',
+ output: 'meta-default-modes.h',
+ command: [gen_default_modes, '@OUTPUT@']
+)
+mutter_built_sources += default_modes_h
+
+if have_wayland
+ # Format:
+ # - protocol name
+ # - protocol stability ('private', 'stable' or 'unstable')
+ # - protocol version (if stability is 'unstable')
+ wayland_protocols = [
+ ['gtk-primary-selection', 'private', ],
+ ['gtk-shell', 'private', ],
+ ['gtk-text-input', 'private', ],
+ ['keyboard-shortcuts-inhibit', 'unstable', 'v1', ],
+ ['linux-dmabuf', 'unstable', 'v1', ],
+ ['pointer-constraints', 'unstable', 'v1', ],
+ ['pointer-gestures', 'unstable', 'v1', ],
+ ['relative-pointer', 'unstable', 'v1', ],
+ ['tablet', 'unstable', 'v2', ],
+ ['text-input', 'unstable', 'v3', ],
+ ['xdg-foreign', 'unstable', 'v1', ],
+ ['xdg-output', 'unstable', 'v1', ],
+ ['xdg-shell', 'unstable', 'v6', ],
+ ['xdg-shell', 'stable', ],
+ ['xwayland-keyboard-grab', 'unstable', 'v1', ],
+ ]
+ if have_wayland_eglstream
+ wayland_eglstream_protocols_dir = wayland_eglstream_protocols_dep.get_pkgconfig_variable('pkgdatadir')
+ wayland_protocols += [
+ ['wayland-eglstream-controller', 'third-party', wayland_eglstream_protocols_dir],
+ ]
+ endif
+
+ wayland_scanner = find_program('wayland-scanner')
+ protocols_dir = wayland_protocols_dep.get_pkgconfig_variable('pkgdatadir')
+ assert(protocols_dir != '', 'Could not get pkgdatadir from wayland-protocols.pc')
+
+ foreach p: wayland_protocols
+ protocol_name = p.get(0)
+ protocol_type = p.get(1)
+
+ if protocol_type == 'stable'
+ output_base = protocol_name
+ input = join_paths(protocols_dir,
+ '@0@/@1@/@2@.xml'.format(protocol_type,
+ protocol_name,
+ output_base))
+ elif protocol_type == 'private'
+ output_base = protocol_name
+ input = 'wayland/protocol/@0@.xml'.format(protocol_name)
+ elif protocol_type == 'third-party'
+ output_base = protocol_name
+ protocol_dir = p.get(2)
+ input = join_paths(protocol_dir, '@0@.xml'.format(protocol_name))
+ else
+ protocol_version = p.get(2)
+ output_base = '@0@-@1@-@2@'.format(protocol_name,
+ protocol_type,
+ protocol_version)
+ input = join_paths(protocols_dir,
+ '@0@/@1@/@2@.xml'.format(protocol_type,
+ protocol_name,
+ output_base))
+ endif
+
+ mutter_built_sources += custom_target('@0@ server header'.format(output_base),
+ input: input,
+ output: '@0@-server-protocol.h'.format(output_base),
+ command: [
+ wayland_scanner,
+ 'server-header',
+ '@INPUT@', '@OUTPUT@',
+ ]
+ )
+
+ mutter_built_sources += custom_target('@0@ source'.format(output_base),
+ input: input,
+ output: '@0@-protocol.c'.format(output_base),
+ command: [
+ wayland_scanner,
+ 'private-code',
+ '@INPUT@', '@OUTPUT@',
+ ]
+ )
+ endforeach
+endif
+
+subdir('meta')
+
+mutter_built_sources += mutter_enum_types
+mutter_built_sources += mutter_version
+
+libmutter_name = 'mutter-' + libmutter_api_version
+libmutter = shared_library(libmutter_name,
+ sources: [
+ mutter_sources,
+ mutter_built_sources,
+ ],
+ include_directories: mutter_includes,
+ c_args: mutter_c_args,
+ dependencies: [
+ libmutter_cogl_dep,
+ libmutter_clutter_dep,
+ mutter_deps,
+ ],
+ install_rpath: pkglibdir,
+ install_dir: libdir,
+ install: true,
+)
+
+libmutter_dep = declare_dependency(
+ link_with: libmutter,
+ include_directories: mutter_includes,
+ dependencies: [
+ libmutter_cogl_dep,
+ libmutter_clutter_dep,
+ mutter_deps,
+ ],
+)
+
+executable('mutter',
+ sources: [
+ files('core/mutter.c'),
+ ],
+ include_directories: mutter_includes,
+ c_args: mutter_c_args,
+ dependencies: [libmutter_dep],
+ install_dir: bindir,
+ install: true,
+)
+
+if have_introspection
+ mutter_introspected_sources = []
+ foreach source : mutter_sources
+ if source.endswith('.c')
+ mutter_introspected_sources += source
+ endif
+ endforeach
+
+ libmutter_gir = gnome.generate_gir(libmutter,
+ sources: [
+ mutter_version,
+ mutter_enum_types[1],
+ mutter_introspected_sources,
+ mutter_public_header_files
+ ],
+ nsversion: libmutter_api_version,
+ namespace: 'Meta',
+ symbol_prefix: 'meta',
+ includes: [
+ 'GObject-2.0',
+ 'GDesktopEnums-3.0',
+ 'Gdk-3.0',
+ 'Gtk-3.0',
+ 'xlib-2.0',
+ 'xfixes-4.0',
+ libmutter_cogl_gir[0],
+ libmutter_cogl_pango_gir[0],
+ libmutter_clutter_gir[0],
+ ],
+ dependencies: [mutter_deps],
+ link_with: [libmutter],
+ extra_args: mutter_c_args + [
+ '-U_GNU_SOURCE',
+ ],
+ install_dir_gir: pkglibdir,
+ install_dir_typelib: pkglibdir,
+ install: true
+ )
+endif
+
+pkg.generate(
+ name: 'Meta',
+ filebase: 'libmutter-' + libmutter_api_version,
+ description: 'Mutter compositor and window manager library',
+ libraries: [libmutter],
+ subdirs: pkgname,
+ requires: [mutter_pkg_deps, libmutter_clutter_name],
+ version: meson.project_version(),
+ variables: [
+ 'apiversion=' + libmutter_api_version,
+ 'girdir=${libdir}/mutter-' + libmutter_api_version,
+ 'typelibdir=${libdir}/mutter-' + libmutter_api_version,
+ ],
+)
+
+subdir('compositor/plugins')
+
+if have_tests
+ subdir('tests')
+endif
diff --git a/src/meta/meson.build b/src/meta/meson.build
new file mode 100644
index 000000000..4fd1edc16
--- /dev/null
+++ b/src/meta/meson.build
@@ -0,0 +1,82 @@
+mutter_public_headers = [
+ 'barrier.h',
+ 'boxes.h',
+ 'common.h',
+ 'compositor.h',
+ 'compositor-mutter.h',
+ 'display.h',
+ 'group.h',
+ 'keybindings.h',
+ 'main.h',
+ 'meta-backend.h',
+ 'meta-background.h',
+ 'meta-background-actor.h',
+ 'meta-background-group.h',
+ 'meta-background-image.h',
+ 'meta-close-dialog.h',
+ 'meta-cursor-tracker.h',
+ 'meta-dnd.h',
+ 'meta-idle-monitor.h',
+ 'meta-inhibit-shortcuts-dialog.h',
+ 'meta-monitor-manager.h',
+ 'meta-plugin.h',
+ 'meta-remote-access-controller.h',
+ 'meta-settings.h',
+ 'meta-shadow-factory.h',
+ 'meta-shaped-texture.h',
+ 'meta-stage.h',
+ 'meta-window-actor.h',
+ 'meta-window-group.h',
+ 'meta-window-shape.h',
+ 'meta-workspace-manager.h',
+ 'prefs.h',
+ 'theme.h',
+ 'types.h',
+ 'util.h',
+ 'window.h',
+ 'workspace.h',
+]
+
+if have_x11
+ mutter_public_headers += [
+ 'meta-x11-display.h',
+ 'meta-x11-errors.h',
+ ]
+endif
+
+install_headers(mutter_public_headers,
+ subdir: mutter_includedir
+)
+
+mutter_public_header_files = files(mutter_public_headers)
+
+mutter_enum_types = gnome.mkenums('meta-enum-types',
+ sources: [mutter_public_headers],
+ c_template: 'meta-enum-types.c.in',
+ h_template: 'meta-enum-types.h.in',
+ install_dir: mutter_includedir,
+ install_header: true,
+)
+
+mutter_version_array = meson.project_version().split('.')
+mutter_version_major = mutter_version_array[0]
+mutter_version_minor = mutter_version_array[1]
+mutter_version_micro = mutter_version_array[2]
+
+mutter_version_cdata = configuration_data()
+mutter_version_cdata.set('MUTTER_MAJOR_VERSION',
+ '@0@'.format(mutter_version_major))
+mutter_version_cdata.set('MUTTER_MINOR_VERSION',
+ '@0@'.format(mutter_version_minor))
+mutter_version_cdata.set('MUTTER_MICRO_VERSION',
+ '@0@'.format(mutter_version_micro))
+mutter_version_cdata.set('MUTTER_PLUGIN_API_VERSION',
+ '@0@'.format(mutter_plugin_api_version))
+
+mutter_version = configure_file(
+ input: 'meta-version.h.in',
+ output: 'meta-version.h',
+ configuration: mutter_version_cdata,
+ install_dir: mutter_includedir,
+ install: true,
+)
diff --git a/src/tests/meson.build b/src/tests/meson.build
new file mode 100644
index 000000000..dd3e96c33
--- /dev/null
+++ b/src/tests/meson.build
@@ -0,0 +1,114 @@
+#tests_srcdir = join_paths(top_srcdir, 'srcs')
+#tests_builddir = join_paths(builddir, 'src/tests')
+tests_includepath = mutter_includes
+tests_c_args = mutter_c_args
+
+tests_deps = [
+ mutter_deps,
+ libmutter_cogl_dep,
+ libmutter_clutter_dep,
+]
+
+test_env = environment()
+test_env.set('G_TEST_SRCDIR', join_paths(top_srcdir, 'src'))
+test_env.set('G_TEST_BUILDDIR', builddir)
+test_env.set('MUTTER_TEST_PLUGIN_PATH', '@0@'.format(default_plugin.full_path()))
+
+test_client = executable('mutter-test-client',
+ sources: ['test-client.c'],
+ include_directories: tests_includepath,
+ c_args: tests_c_args,
+ dependencies: [
+ gtk3_dep,
+ gio_unix_dep,
+ xext_dep,
+ ],
+ install: false,
+)
+
+test_runner = executable('mutter-test-runner',
+ sources: [
+ 'test-utils.c',
+ 'test-utils.h',
+ 'test-runner.c',
+ ],
+ include_directories: tests_includepath,
+ c_args: tests_c_args,
+ link_with: [libmutter],
+ dependencies: [tests_deps],
+ install: false,
+)
+
+unit_tests = executable('mutter-test-unit-tests',
+ sources: [
+ 'test-utils.c',
+ 'test-utils.h',
+ 'unit-tests.c',
+ 'boxes-tests.c',
+ 'boxes-tests.h',
+ 'meta-backend-test.c',
+ 'meta-backend-test.h',
+ 'meta-monitor-manager-test.c',
+ 'meta-monitor-manager-test.h',
+ 'monitor-config-migration-unit-tests.c',
+ 'monitor-config-migration-unit-tests.h',
+ 'monitor-store-unit-tests.c',
+ 'monitor-store-unit-tests.h',
+ 'monitor-test-utils.c',
+ 'monitor-test-utils.h',
+ 'monitor-unit-tests.c',
+ 'monitor-unit-tests.h',
+ ],
+ include_directories: tests_includepath,
+ c_args: tests_c_args,
+ link_with: [libmutter],
+ dependencies: [tests_deps],
+ install: false,
+)
+
+headless_start_test = executable('mutter-headless-start-test',
+ sources: [
+ 'headless-start-test.c',
+ 'meta-backend-test.c',
+ 'meta-backend-test.h',
+ 'meta-monitor-manager-test.c',
+ 'meta-monitor-manager-test.h',
+ 'test-utils.c',
+ 'test-utils.h',
+ ],
+ include_directories: tests_includepath,
+ c_args: tests_c_args,
+ link_with: [libmutter],
+ dependencies: [tests_deps],
+ install: false,
+)
+
+stacking_tests = files([
+ 'stacking/basic-x11.metatest',
+ 'stacking/basic-wayland.metatest',
+ 'stacking/minimized.metatest',
+ 'stacking/mixed-windows.metatest',
+ 'stacking/set-parent.metatest',
+ 'stacking/override-redirect.metatest',
+])
+
+test('mutter/stacking', test_runner,
+ env: test_env,
+ args: [
+ stacking_tests,
+ ],
+ is_parallel: false,
+ timeout: 60,
+)
+
+test('mutter/unit', unit_tests,
+ env: test_env,
+ is_parallel: false,
+ timeout: 60,
+)
+
+test('mutter/unit/headless-start', headless_start_test,
+ env: test_env,
+ is_parallel: false,
+ timeout: 60,
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]