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'.
2018-05-22 13:55:35 +00:00
|
|
|
project('mutter', 'c',
|
2024-04-19 12:55:16 +00:00
|
|
|
version: '46.1',
|
2024-06-18 14:08:37 +00:00
|
|
|
meson_version: '>= 1.1.0',
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
license: 'GPLv2+'
|
|
|
|
)
|
|
|
|
|
2019-07-23 18:26:14 +00:00
|
|
|
split_version = meson.project_version().split('.')
|
|
|
|
|
2021-10-14 16:37:45 +00:00
|
|
|
# API version, bump each development cycle
|
2024-06-22 12:59:32 +00:00
|
|
|
libmutter_api_version = '15'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
2021-08-05 14:18:44 +00:00
|
|
|
mutter_srcdir = meson.current_source_dir()
|
|
|
|
mutter_builddir = meson.current_build_dir()
|
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
# generic version requirements
|
2022-07-27 11:30:15 +00:00
|
|
|
lcms2_req = '>= 2.6'
|
color-manager: Take over color device management from gsd-color
Previously, gsd-color handled adding color devices. It got information
about those via the GnomeRR API, which is part of libgnome-desktop.
libgnome-desktop itself got this information from the
org.gnome.Mutter.DisplayConfig.GetResources() D-Bus method, implemented
by mutter.
Now, mutter itself will add all the monitor color devices itself,
without having to go via gsd-color.
We sometimes need to delete colord devices synchronously, in certain
race conditions when we add and remove devices very quickly (e.g. in
tests). However, we cannot use libcolord's 'sync' API variants, as it
has a nested takes-all main loop as a way to invoke the sync call. This
effectively means we end up sometimes not return from this function in a
timely manner, causing wierd issues.
Instead, create our own sync helper, that uses a separate context that
we temporarly push as the thread-default one.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2141>
2021-10-27 20:47:06 +00:00
|
|
|
colord_req = '>= 1.4.5'
|
2019-05-17 23:11:43 +00:00
|
|
|
fribidi_req = '>= 1.0.0'
|
2022-12-22 10:49:48 +00:00
|
|
|
glib_req = '>= 2.75.1'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
gi_req = '>= 0.9.5'
|
2020-09-20 21:38:17 +00:00
|
|
|
graphene_req = '>= 1.10.2'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
gtk3_req = '>= 3.19.8'
|
frames: Add new X11 frames client
This small X11 client takes care of creating frames for client
windows, Mutter will use this client to delegate window frame
rendering and event handling.
The MetaWindowTracker object will keep track of windows created
from other clients, and will await for _MUTTER_NEEDS_FRAME property
updates on those (coming from Mutter), indicating the need for a
frame window.
This process is resilient to restarts of the frames client, existing
windows will be queried during start, and the existence of relevant
properties checked. Mutter will be able to just hide/show
SSD-decorated windows while the frames client restarts.
The frames are created through GTK4 widgets, the MetaWindowContent
widget acts as a replacement prop for the actual client window,
and the MetaFrameHeader wraps GtkHeaderBar so that windows can be
overshrunk, but otherwise a MetaFrame is a 100% true GTK4 GtkWindow.
After a frame window is created for a client window, the
_MUTTER_FRAME_FOR property will be set on the frame window,
indicating to mutter the correspondence between both Windows.
Additionally, the pixel sizes of the visible left/right/top/bottom
borders of the frame will be set through the _MUTTER_FRAME_EXTENTS
property, set on the frame window.
In order to make the frame window behave as the frame for the
client window, a number of properties will be tracked from the
client window to update the relevant frame behavior (window title,
resizability, availability of actions...), and also some forwarding
of events happening in the frame will be forwarded to the client
window (mainly, WM_DELETE_WINDOW when the close button is clicked).
Other than that, the frames are pretty much CSD GTK4 windows, so
window drags and resizes, and window context menus are forwarded for
the WM to handle.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2175>
2021-12-21 20:11:05 +00:00
|
|
|
gtk4_req = '>= 4.0.0'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
gdk_pixbuf_req = '>= 2.0'
|
2020-11-22 13:42:35 +00:00
|
|
|
pango_req = '>= 1.46.0'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
cairo_req = '>= 1.10.0'
|
|
|
|
pangocairo_req = '>= 1.20'
|
2023-09-21 10:05:24 +00:00
|
|
|
pixman_req = '>= 0.42'
|
2021-01-14 11:38:01 +00:00
|
|
|
gsettings_desktop_schemas_req = '>= 40.alpha'
|
2022-05-28 18:18:41 +00:00
|
|
|
x11_req = '>= 1.7.0'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
xcomposite_req = '>= 0.4'
|
|
|
|
xkbcommon_req = '>= 0.4.3'
|
xwayland: Mark our X11 connection terminatable
The connection to the Xserver for the X11 window manager part of mutter
even on Wayland may prevent the Xserver from shutting down.
Currently, what mutter does is to check the X11 clients still connected
to Xwayland using the XRes extension, with a list of X11 clients that
can be safely ignored (typically the GNOME XSettings daemon, the IBus
daemon, pulseaudio and even mutter window manager itself).
When there is just those known clients remaining, mutter would kill
Xwayland automatically.
But that's racy, because between the time mutter checks with Xwayland
the remaining clients and the time it actually kills the process, a new
X11 client might have come along and won't be able to connect to
Xwayland that mutter is just about to kill.
Because of that, the feature “autoclose-xwayland” is marked as an
experimental feature in mutter and not enabled by default.
Thankfully, the Xserver has all it takes to manage that already, and
is even capable of terminating itself once all X11 clients are gone (the
-terminate option on the command line).
With XFixes version 6, the X11 clients can declare themselves
"terminatable", so that the Xserver could simply ignore those X11
clients when checking the remaining clients and terminate itself
automatically.
Use that mechanism to declare mutter's own connection to the Xserver as
"terminatable" when Xwayland is started on demand so that it won't hold
Xwayland alive for the sole purpose of mutter itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1794>
2021-03-17 14:44:45 +00:00
|
|
|
xfixes_req = '>= 6'
|
2019-09-01 12:02:01 +00:00
|
|
|
xi_req = '>= 1.7.4'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
xrandr_req = '>= 1.5.0'
|
|
|
|
libstartup_notification_req = '>= 0.7'
|
2019-01-08 14:59:57 +00:00
|
|
|
libcanberra_req = '>= 0.26'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
libwacom_req = '>= 0.13'
|
|
|
|
atk_req = '>= 2.5.3'
|
2023-01-02 22:11:37 +00:00
|
|
|
harfbuzz_req = '>= 2.6'
|
2023-08-31 08:42:36 +00:00
|
|
|
libei_req = '>= 1.0.901'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
|
|
|
# optional version requirements
|
2018-11-06 18:48:47 +00:00
|
|
|
udev_req = '>= 228'
|
2018-11-06 19:04:12 +00:00
|
|
|
gudev_req = '>= 232'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
|
|
|
# wayland version requirements
|
2024-04-09 12:37:50 +00:00
|
|
|
wayland_server_req = '>= 1.23'
|
2023-09-17 16:57:37 +00:00
|
|
|
wayland_protocols_req = '>= 1.36'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
|
|
|
# native backend version requirements
|
2021-09-15 16:01:00 +00:00
|
|
|
libinput_req = '>= 1.19.0'
|
2022-05-17 13:24:33 +00:00
|
|
|
gbm_req = '>= 21.3'
|
2024-03-13 14:34:14 +00:00
|
|
|
libdrm_req = '>= 2.4.118'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
|
|
|
# screen cast version requirements
|
2021-12-07 16:19:14 +00:00
|
|
|
libpipewire_req = '>= 0.3.33'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
2019-12-04 22:25:41 +00:00
|
|
|
# profiler requirements
|
2020-07-04 19:01:28 +00:00
|
|
|
sysprof_req = '>= 3.37.2'
|
2019-12-04 22:25:41 +00:00
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
gnome = import('gnome')
|
|
|
|
pkg = import('pkgconfig')
|
|
|
|
i18n = import('i18n')
|
2021-12-10 22:49:48 +00:00
|
|
|
fs = import('fs')
|
2024-03-07 05:05:15 +00:00
|
|
|
python = import('python')
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
2022-02-22 22:22:38 +00:00
|
|
|
add_project_link_arguments(
|
|
|
|
cc.get_supported_link_arguments(
|
|
|
|
# meson automatically adds -rpath to targets and strips them when they
|
|
|
|
# are installed. ld adds a RUNPATH tag for -rpath arguments by default.
|
|
|
|
# This makes ld add a RPATH tag instead (as it did some time ago).
|
|
|
|
# The reason why we want RPATH and not RUNPATH is that LD_LIBRARY_PATH
|
|
|
|
# takes precedence over RUNPATH but not over RPATH. Since we usually run
|
|
|
|
# development builds in jhbuild which sets up LD_LIBRARY_PATH this can
|
|
|
|
# result in wrong dependencies being picked up by the linker.
|
|
|
|
'-Wl,--disable-new-dtags',
|
|
|
|
),
|
|
|
|
language : 'c',
|
|
|
|
)
|
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
prefix = get_option('prefix')
|
|
|
|
|
2023-05-04 11:49:59 +00:00
|
|
|
bindir = prefix / get_option('bindir')
|
|
|
|
datadir = prefix / get_option('datadir')
|
|
|
|
libdir = prefix / get_option('libdir')
|
|
|
|
libexecdir = prefix / get_option('libexecdir')
|
|
|
|
includedir = prefix / get_option('includedir')
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
sysconfdir = get_option('sysconfdir')
|
|
|
|
|
|
|
|
pkgname = '@0@-@1@'.format(meson.project_name(), libmutter_api_version)
|
|
|
|
|
2023-05-04 11:49:59 +00:00
|
|
|
pkgdatadir = datadir / pkgname
|
|
|
|
pkglibdir = libdir / pkgname
|
|
|
|
pkgincludedir = includedir / pkgname
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
2023-05-04 11:49:59 +00:00
|
|
|
pcdir = libdir / 'pkgconfig'
|
2019-01-08 21:28:18 +00:00
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
gettext_package = meson.project_name()
|
2023-05-04 11:49:59 +00:00
|
|
|
localedir = datadir / 'locale'
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
2018-12-20 14:29:59 +00:00
|
|
|
libmutter_name = 'mutter-' + libmutter_api_version
|
|
|
|
|
2023-05-04 11:49:59 +00:00
|
|
|
mutter_installed_tests_datadir = datadir / 'installed-tests' / libmutter_name
|
|
|
|
mutter_installed_tests_libexecdir = libexecdir / 'installed-tests' / libmutter_name
|
2018-12-17 15:26:07 +00:00
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
m_dep = cc.find_library('m', required: true)
|
2019-02-15 16:22:25 +00:00
|
|
|
graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req)
|
2024-01-03 11:02:43 +00:00
|
|
|
gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
pango_dep = dependency('pango', version: pango_req)
|
|
|
|
cairo_dep = dependency('cairo', version: cairo_req)
|
|
|
|
pangocairo_dep = dependency('pangocairo', version: pangocairo_req)
|
2023-09-21 10:05:24 +00:00
|
|
|
pixman_dep = dependency('pixman-1', version: pixman_req)
|
2019-05-17 23:11:43 +00:00
|
|
|
fribidi_dep = dependency('fribidi', version: fribidi_req)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
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)
|
2022-05-03 10:41:06 +00:00
|
|
|
gnome_settings_daemon_dep = dependency('gnome-settings-daemon', required: false)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
xkbcommon_dep = dependency('xkbcommon', version: xkbcommon_req)
|
|
|
|
ice_dep = dependency('ice')
|
|
|
|
atk_dep = dependency('atk', version: atk_req)
|
2020-02-26 15:08:56 +00:00
|
|
|
dbus_dep = dependency('dbus-1')
|
color-manager: Take over color device management from gsd-color
Previously, gsd-color handled adding color devices. It got information
about those via the GnomeRR API, which is part of libgnome-desktop.
libgnome-desktop itself got this information from the
org.gnome.Mutter.DisplayConfig.GetResources() D-Bus method, implemented
by mutter.
Now, mutter itself will add all the monitor color devices itself,
without having to go via gsd-color.
We sometimes need to delete colord devices synchronously, in certain
race conditions when we add and remove devices very quickly (e.g. in
tests). However, we cannot use libcolord's 'sync' API variants, as it
has a nested takes-all main loop as a way to invoke the sync call. This
effectively means we end up sometimes not return from this function in a
timely manner, causing wierd issues.
Instead, create our own sync helper, that uses a separate context that
we temporarly push as the thread-default one.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2141>
2021-10-27 20:47:06 +00:00
|
|
|
colord_dep = dependency('colord', version: colord_req)
|
2022-07-27 11:30:15 +00:00
|
|
|
lcms2_dep = dependency('lcms2', version: lcms2_req)
|
2023-01-02 22:11:37 +00:00
|
|
|
harfbuzz_dep = dependency('harfbuzz', version: harfbuzz_req)
|
2022-04-27 08:50:43 +00:00
|
|
|
libeis_dep = dependency('libeis-1.0', version: libei_req)
|
|
|
|
libei_dep = dependency('libei-1.0', version: libei_req)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
2022-03-25 10:50:52 +00:00
|
|
|
have_wayland = get_option('wayland')
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
# For now always require X11 support
|
|
|
|
have_x11 = true
|
2022-06-13 08:09:26 +00:00
|
|
|
have_xwayland = get_option('xwayland')
|
2022-03-25 10:50:52 +00:00
|
|
|
have_x11_client = have_x11 or have_xwayland
|
|
|
|
|
|
|
|
if have_xwayland and not have_wayland
|
|
|
|
error('XWayland support requires Wayland support enabled')
|
|
|
|
endif
|
|
|
|
|
2022-04-05 13:01:29 +00:00
|
|
|
if not have_wayland and not have_x11
|
|
|
|
error('A Wayland/X11 backend must be enabled')
|
|
|
|
endif
|
|
|
|
|
2022-03-25 10:50:52 +00:00
|
|
|
if have_x11_client
|
2022-05-26 13:05:02 +00:00
|
|
|
gtk4_dep = dependency('gtk4', version: gtk4_req)
|
|
|
|
|
2022-05-28 18:18:41 +00:00
|
|
|
x11_dep = dependency('x11', version: x11_req)
|
2022-03-25 10:50:52 +00:00
|
|
|
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_x11_dep = dependency('xkbcommon-x11')
|
|
|
|
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')
|
|
|
|
xau_dep = dependency('xau')
|
|
|
|
endif
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
2024-02-10 23:26:21 +00:00
|
|
|
use_libdisplay_info = get_option('libdisplay_info')
|
|
|
|
libdisplay_info_dep = dependency('libdisplay-info', required: use_libdisplay_info)
|
|
|
|
have_libdisplay_info = libdisplay_info_dep.found()
|
2022-03-03 10:51:00 +00:00
|
|
|
|
|
|
|
have_gnome_desktop = get_option('libgnome_desktop')
|
|
|
|
if have_gnome_desktop
|
2023-02-16 15:08:16 +00:00
|
|
|
gnome_desktop_dep = dependency('gnome-desktop-4')
|
2022-03-03 10:51:00 +00:00
|
|
|
endif
|
|
|
|
|
2022-04-26 13:00:46 +00:00
|
|
|
have_sound_player = get_option('sound_player')
|
|
|
|
if have_sound_player
|
|
|
|
libcanberra_dep = dependency('libcanberra', version: libcanberra_req)
|
|
|
|
endif
|
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
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
|
|
|
|
|
2022-05-04 10:21:23 +00:00
|
|
|
have_glx = get_option('glx') and have_x11_client
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
if have_glx
|
|
|
|
if not have_gl
|
|
|
|
error('GLX support requires OpenGL to be enabled')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2022-03-25 10:50:52 +00:00
|
|
|
have_egl_xlib = have_egl and have_x11_client
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-11-16 11:59:15 +00:00
|
|
|
if not have_gl and not have_gles2
|
|
|
|
error('Neither GLES2 or OpenGL was enabled')
|
|
|
|
endif
|
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
if have_wayland
|
|
|
|
wayland_server_dep = dependency('wayland-server', version: wayland_server_req)
|
2019-12-06 18:05:32 +00:00
|
|
|
wayland_client_dep = dependency('wayland-client', version: wayland_server_req)
|
2023-04-17 16:35:37 +00:00
|
|
|
wayland_cursor_dep = dependency('wayland-cursor')
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
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)
|
2018-11-06 19:04:12 +00:00
|
|
|
gudev_dep = dependency('gudev-1.0', version: gudev_req)
|
2020-09-14 18:36:17 +00:00
|
|
|
udev_dep = dependency('udev')
|
2021-04-29 14:33:36 +00:00
|
|
|
|
|
|
|
udev_dir = get_option('udev_dir')
|
|
|
|
if udev_dir == ''
|
2022-11-19 01:16:04 +00:00
|
|
|
udev_dir = udev_dep.get_variable('udevdir')
|
2021-04-29 14:33:36 +00:00
|
|
|
endif
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
endif
|
|
|
|
|
2021-08-05 14:07:28 +00:00
|
|
|
have_libsystemd = get_option('systemd')
|
|
|
|
libsystemd_dep = dependency('libsystemd', required: have_libsystemd)
|
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
have_native_backend = get_option('native_backend')
|
|
|
|
if have_native_backend
|
|
|
|
libgbm_dep = dependency('gbm', version: gbm_req)
|
|
|
|
libinput_dep = dependency('libinput', version: libinput_req)
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-06-09 06:03:53 +00:00
|
|
|
if have_wayland or have_native_backend
|
2024-01-03 13:44:48 +00:00
|
|
|
libdrm_dep = dependency('libdrm', version: libdrm_req)
|
2023-06-09 06:03:53 +00:00
|
|
|
endif
|
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
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
|
|
|
|
|
2024-05-22 08:55:09 +00:00
|
|
|
have_sm = get_option('sm') and have_x11
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
if have_sm
|
|
|
|
sm_dep = dependency('sm')
|
|
|
|
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
|
|
|
|
|
2024-05-22 08:57:50 +00:00
|
|
|
have_startup_notification = get_option('startup_notification') and have_x11_client
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
if have_startup_notification
|
2024-05-22 08:57:50 +00:00
|
|
|
libstartup_notification_dep = dependency('libstartup-notification-1.0',
|
|
|
|
version: libstartup_notification_req)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
have_remote_desktop = get_option('remote_desktop')
|
|
|
|
if have_remote_desktop
|
2020-01-14 08:44:45 +00:00
|
|
|
libpipewire_dep = dependency('libpipewire-0.3', version: libpipewire_req)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
have_introspection = get_option('introspection')
|
|
|
|
if have_introspection
|
2024-01-03 11:02:43 +00:00
|
|
|
gobject_introspection_dep = dependency('gobject-introspection-1.0', version: gi_req)
|
2018-12-22 10:28:46 +00:00
|
|
|
|
|
|
|
introspection_args = [
|
|
|
|
'--quiet',
|
|
|
|
'-U_GNU_SOURCE',
|
|
|
|
]
|
2024-01-16 10:06:06 +00:00
|
|
|
|
|
|
|
introspection_common = {
|
|
|
|
'install_dir_gir': pkglibdir,
|
|
|
|
'install_dir_typelib': pkglibdir,
|
|
|
|
'install': true,
|
|
|
|
'fatal_warnings': get_option('werror'),
|
|
|
|
}
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
endif
|
|
|
|
|
2024-03-03 21:50:00 +00:00
|
|
|
# Check for timerfd_create(2)
|
|
|
|
have_timerfd = cc.links('''
|
|
|
|
#include <sys/timerfd.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
int main (int argc, char ** argv) {
|
|
|
|
struct itimerspec ts = {{0}};
|
|
|
|
int fd = timerfd_create (CLOCK_MONOTONIC, TFD_NONBLOCK | TFD_CLOEXEC);
|
|
|
|
timerfd_settime (fd, TFD_TIMER_ABSTIME, &ts, NULL);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
''', name : 'timerfd_create(2) system call')
|
|
|
|
|
2024-03-08 10:59:40 +00:00
|
|
|
have_malloc_trim = meson.get_compiler('c').has_function('malloc_trim')
|
|
|
|
|
2022-01-19 20:26:30 +00:00
|
|
|
have_documentation = get_option('docs')
|
2024-06-18 14:08:37 +00:00
|
|
|
have_tests = get_option('tests').enable_auto_if(have_native_backend).enabled()
|
|
|
|
have_mutter_tests = false
|
2019-02-13 17:51:21 +00:00
|
|
|
have_cogl_tests = false
|
|
|
|
have_clutter_tests = false
|
2021-12-10 22:49:48 +00:00
|
|
|
have_kvm_tests = false
|
2021-12-13 09:39:45 +00:00
|
|
|
have_tty_tests = false
|
2019-02-13 17:51:21 +00:00
|
|
|
have_installed_tests = false
|
2024-06-15 20:39:09 +00:00
|
|
|
have_x11_tests = false
|
2019-02-13 17:51:21 +00:00
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
if have_tests
|
2023-03-03 14:54:59 +00:00
|
|
|
gtk3_dep = dependency('gtk+-3.0', version: gtk3_req)
|
2024-03-07 05:05:15 +00:00
|
|
|
dbusmock_dep = python.find_installation('python3', modules: ['dbusmock'], required: false)
|
2023-03-03 14:54:59 +00:00
|
|
|
|
2024-06-18 14:08:37 +00:00
|
|
|
if not have_native_backend
|
|
|
|
error('Tests require the native backend to be enabled')
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_mutter_tests = get_option('mutter_tests')
|
|
|
|
if have_mutter_tests
|
2019-02-13 17:51:21 +00:00
|
|
|
if not have_wayland
|
|
|
|
error('Tests require Wayland to be enabled')
|
|
|
|
endif
|
2022-03-25 10:50:52 +00:00
|
|
|
if not have_x11_client
|
|
|
|
error('Tests requires an X11 client')
|
|
|
|
endif
|
2024-03-07 05:05:15 +00:00
|
|
|
if not dbusmock_dep.found()
|
|
|
|
error('Tests require python-dbusmock')
|
|
|
|
endif
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
endif
|
2021-12-10 22:49:48 +00:00
|
|
|
have_kvm_tests = get_option('kvm_tests')
|
|
|
|
if have_kvm_tests
|
|
|
|
if not have_native_backend
|
|
|
|
error('KVM tests need the native backend tests')
|
|
|
|
endif
|
|
|
|
if host_machine.cpu_family() != 'x86_64'
|
|
|
|
error('KVM tests are only supported on x86_64')
|
|
|
|
endif
|
|
|
|
endif
|
2021-12-13 09:39:45 +00:00
|
|
|
have_tty_tests = get_option('tty_tests')
|
|
|
|
if have_tty_tests
|
|
|
|
if not have_native_backend
|
|
|
|
error('TTY tests need the native backend tests')
|
|
|
|
endif
|
|
|
|
endif
|
2019-02-13 17:51:21 +00:00
|
|
|
|
|
|
|
have_cogl_tests = get_option('cogl_tests')
|
|
|
|
have_clutter_tests = get_option('clutter_tests')
|
|
|
|
have_installed_tests = get_option('installed_tests')
|
2021-08-27 11:02:42 +00:00
|
|
|
|
2020-05-04 17:22:35 +00:00
|
|
|
meta_dbus_runner = find_program('src/tests/meta-dbus-runner.py')
|
|
|
|
default_test_wrappers = [
|
|
|
|
meta_dbus_runner,
|
2022-08-04 14:33:50 +00:00
|
|
|
'--',
|
2020-05-04 17:22:35 +00:00
|
|
|
]
|
|
|
|
|
2022-08-04 14:33:50 +00:00
|
|
|
if get_option('catch')
|
|
|
|
catch = find_program('catch')
|
|
|
|
default_test_wrappers += [
|
|
|
|
catch,
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2020-05-04 17:22:35 +00:00
|
|
|
add_test_setup('default',
|
|
|
|
is_default: true,
|
|
|
|
exe_wrapper: default_test_wrappers,
|
|
|
|
)
|
|
|
|
|
2021-10-28 12:55:41 +00:00
|
|
|
add_test_setup('plain')
|
|
|
|
|
2024-06-15 20:39:09 +00:00
|
|
|
if have_x11
|
|
|
|
xvfb = find_program('xvfb-run', required: false)
|
|
|
|
if xvfb.found()
|
|
|
|
have_x11_tests = true
|
|
|
|
endif
|
|
|
|
endif
|
2022-05-27 15:12:46 +00:00
|
|
|
|
2021-08-27 11:02:42 +00:00
|
|
|
add_test_setup('CI',
|
|
|
|
env: [
|
|
|
|
'MUTTER_DEBUG_DUMMY_MODE_SPECS=800x600@10.0',
|
|
|
|
],
|
|
|
|
exe_wrapper: [
|
2020-05-04 17:22:35 +00:00
|
|
|
default_test_wrappers,
|
2021-08-27 11:02:42 +00:00
|
|
|
],
|
|
|
|
timeout_multiplier: 10,
|
|
|
|
)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
endif
|
|
|
|
|
2018-05-15 15:31:29 +00:00
|
|
|
have_profiler = get_option('profiler')
|
|
|
|
if have_profiler
|
2020-07-04 19:01:28 +00:00
|
|
|
# libsysprof-capture support
|
2022-08-12 21:57:31 +00:00
|
|
|
libsysprof_capture_dep = dependency('sysprof-capture-4',
|
2020-07-04 19:01:28 +00:00
|
|
|
required: true,
|
|
|
|
default_options: [
|
2022-05-26 05:59:29 +00:00
|
|
|
'examples=false',
|
|
|
|
'gtk=false',
|
|
|
|
'tests=false',
|
|
|
|
'tools=false',
|
2020-07-04 19:01:28 +00:00
|
|
|
'libsysprof=false',
|
2022-05-26 05:59:29 +00:00
|
|
|
'sysprofd=none',
|
2020-07-04 19:01:28 +00:00
|
|
|
'help=false',
|
|
|
|
],
|
|
|
|
fallback: ['sysprof', 'libsysprof_capture_dep'],
|
2024-01-03 11:02:43 +00:00
|
|
|
version: sysprof_req,
|
2020-07-04 19:01:28 +00:00
|
|
|
)
|
2022-08-12 21:57:31 +00:00
|
|
|
|
|
|
|
if libsysprof_capture_dep.type_name() == 'pkgconfig'
|
2023-08-16 16:38:53 +00:00
|
|
|
sysprof_dep = dependency('sysprof-6', 'sysprof-4')
|
2023-05-04 11:49:59 +00:00
|
|
|
sysprof_dbus_interfaces_dir = sysprof_dep.get_variable('datadir') / 'dbus-1' / 'interfaces'
|
2022-08-12 21:57:31 +00:00
|
|
|
else
|
2023-05-04 11:49:59 +00:00
|
|
|
sysprof_dbus_interfaces_dir = mutter_srcdir / 'subprojects' / 'sysprof' / 'src'
|
2022-08-12 21:57:31 +00:00
|
|
|
endif
|
2018-05-15 15:31:29 +00:00
|
|
|
endif
|
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
required_functions = [
|
|
|
|
'ffs',
|
|
|
|
'clz',
|
2019-06-17 21:20:10 +00:00
|
|
|
'memmem',
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
]
|
|
|
|
foreach function : required_functions
|
|
|
|
if not cc.has_function(function)
|
|
|
|
error('Required function ' + function + ' missing')
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2019-09-09 09:17:22 +00:00
|
|
|
if host_machine.cpu_family() == 'x86'
|
|
|
|
add_project_arguments('-ffloat-store', language: 'c')
|
|
|
|
endif
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
|
|
|
|
2019-04-29 10:44:16 +00:00
|
|
|
buildtype = get_option('buildtype')
|
|
|
|
if buildtype != 'plain'
|
2023-10-10 02:14:51 +00:00
|
|
|
mutter_c_args = [
|
2023-10-18 06:25:21 +00:00
|
|
|
'-fno-omit-frame-pointer',
|
|
|
|
'-mno-omit-leaf-frame-pointer',
|
2019-04-29 10:44:16 +00:00
|
|
|
'-fno-strict-aliasing',
|
|
|
|
'-Wpointer-arith',
|
|
|
|
'-Wmissing-declarations',
|
|
|
|
'-Wformat=2',
|
|
|
|
'-Wstrict-prototypes',
|
|
|
|
'-Wmissing-prototypes',
|
|
|
|
'-Wnested-externs',
|
|
|
|
'-Wold-style-definition',
|
|
|
|
'-Wundef',
|
|
|
|
'-Wunused',
|
|
|
|
'-Wcast-align',
|
|
|
|
'-Wmissing-noreturn',
|
|
|
|
'-Wmissing-format-attribute',
|
|
|
|
'-Wmissing-include-dirs',
|
|
|
|
'-Wlogical-op',
|
|
|
|
'-Wignored-qualifiers',
|
|
|
|
'-Werror=redundant-decls',
|
|
|
|
'-Werror=implicit',
|
|
|
|
'-Werror=nonnull',
|
|
|
|
'-Werror=init-self',
|
|
|
|
'-Werror=main',
|
|
|
|
'-Werror=missing-braces',
|
|
|
|
'-Werror=sequence-point',
|
|
|
|
'-Werror=return-type',
|
|
|
|
'-Werror=trigraphs',
|
|
|
|
'-Werror=array-bounds',
|
|
|
|
'-Werror=write-strings',
|
|
|
|
'-Werror=address',
|
|
|
|
'-Werror=int-to-pointer-cast',
|
|
|
|
'-Werror=pointer-to-int-cast',
|
|
|
|
'-Werror=empty-body',
|
|
|
|
'-Werror=write-strings',
|
2022-05-07 21:09:44 +00:00
|
|
|
'-Werror=strict-aliasing',
|
2022-03-04 20:02:25 +00:00
|
|
|
'-Wno-sign-compare',
|
|
|
|
'-Wno-cast-function-type',
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
'-Wno-missing-field-initializers',
|
|
|
|
'-Wno-type-limits',
|
2023-11-09 14:29:38 +00:00
|
|
|
'-Wshadow',
|
2019-04-29 10:44:16 +00:00
|
|
|
]
|
2019-01-20 16:44:22 +00:00
|
|
|
|
2023-10-10 02:14:51 +00:00
|
|
|
if get_option('debug')
|
|
|
|
mutter_c_args += [
|
|
|
|
'-DG_ENABLE_DEBUG',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
supported_mutter_c_args = cc.get_supported_arguments(mutter_c_args)
|
|
|
|
add_project_arguments(supported_mutter_c_args, language: 'c')
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
cc.compiles('void main (void) { __builtin_ffsl (0); __builtin_popcountl (0); }')
|
|
|
|
|
2023-09-06 17:06:54 +00:00
|
|
|
have_eventfd = cc.has_header('sys/eventfd.h')
|
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
cdata = configuration_data()
|
|
|
|
cdata.set_quoted('GETTEXT_PACKAGE', gettext_package)
|
|
|
|
cdata.set_quoted('VERSION', meson.project_version())
|
2021-11-29 19:31:01 +00:00
|
|
|
cdata.set_quoted('PACKAGE_NAME', meson.project_name())
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
|
|
|
|
|
|
|
cdata.set('HAVE_EGL', have_egl)
|
2023-11-07 10:56:00 +00:00
|
|
|
cdata.set('HAVE_GLX', have_glx)
|
|
|
|
cdata.set('HAVE_EGL_PLATFORM_XLIB', have_egl_xlib)
|
|
|
|
cdata.set('HAVE_GL', have_gl)
|
|
|
|
cdata.set('HAVE_GLES2', have_gles2)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
cdata.set('HAVE_WAYLAND', have_wayland)
|
2022-05-06 13:51:40 +00:00
|
|
|
cdata.set('HAVE_XWAYLAND', have_xwayland)
|
|
|
|
cdata.set('HAVE_X11', have_x11)
|
|
|
|
cdata.set('HAVE_X11_CLIENT', have_x11_client)
|
2021-08-05 14:07:28 +00:00
|
|
|
cdata.set('HAVE_LIBSYSTEMD', have_libsystemd)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
cdata.set('HAVE_NATIVE_BACKEND', have_native_backend)
|
|
|
|
cdata.set('HAVE_REMOTE_DESKTOP', have_remote_desktop)
|
2022-03-03 10:51:00 +00:00
|
|
|
cdata.set('HAVE_GNOME_DESKTOP', have_gnome_desktop)
|
2022-04-26 13:00:46 +00:00
|
|
|
cdata.set('HAVE_SOUND_PLAYER', have_sound_player)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
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_LIBWACOM', have_libwacom)
|
|
|
|
cdata.set('HAVE_SM', have_sm)
|
|
|
|
cdata.set('HAVE_STARTUP_NOTIFICATION', have_startup_notification)
|
|
|
|
cdata.set('HAVE_INTROSPECTION', have_introspection)
|
2019-05-31 15:42:27 +00:00
|
|
|
cdata.set('HAVE_PROFILER', have_profiler)
|
2023-03-07 05:21:19 +00:00
|
|
|
cdata.set('HAVE_LIBDISPLAY_INFO', have_libdisplay_info)
|
2023-11-07 10:56:00 +00:00
|
|
|
cdata.set('HAVE_PANGO_FT2', have_pango_ft2)
|
2024-03-03 21:50:00 +00:00
|
|
|
cdata.set('HAVE_TIMERFD', have_timerfd)
|
2024-03-08 10:59:40 +00:00
|
|
|
cdata.set('HAVE_MALLOC_TRIM', have_malloc_trim)
|
2023-09-06 17:06:54 +00:00
|
|
|
cdata.set('HAVE_EVENTFD', have_eventfd)
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
2022-03-25 10:50:52 +00:00
|
|
|
if have_x11_client
|
2022-11-19 01:16:04 +00:00
|
|
|
xkb_base = xkeyboard_config_dep.get_variable('xkb_base')
|
2022-03-25 10:50:52 +00:00
|
|
|
cdata.set_quoted('XKB_BASE', xkb_base)
|
|
|
|
endif
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
|
2019-09-27 08:15:48 +00:00
|
|
|
if cc.has_header_symbol('sys/prctl.h', 'prctl')
|
|
|
|
cdata.set('HAVE_SYS_PRCTL', 1)
|
|
|
|
endif
|
|
|
|
|
2019-07-19 20:50:31 +00:00
|
|
|
have_xwayland_initfd = false
|
2021-01-22 10:16:24 +00:00
|
|
|
have_xwayland_listenfd = false
|
xwayland: Mark our X11 connection terminatable
The connection to the Xserver for the X11 window manager part of mutter
even on Wayland may prevent the Xserver from shutting down.
Currently, what mutter does is to check the X11 clients still connected
to Xwayland using the XRes extension, with a list of X11 clients that
can be safely ignored (typically the GNOME XSettings daemon, the IBus
daemon, pulseaudio and even mutter window manager itself).
When there is just those known clients remaining, mutter would kill
Xwayland automatically.
But that's racy, because between the time mutter checks with Xwayland
the remaining clients and the time it actually kills the process, a new
X11 client might have come along and won't be able to connect to
Xwayland that mutter is just about to kill.
Because of that, the feature “autoclose-xwayland” is marked as an
experimental feature in mutter and not enabled by default.
Thankfully, the Xserver has all it takes to manage that already, and
is even capable of terminating itself once all X11 clients are gone (the
-terminate option on the command line).
With XFixes version 6, the X11 clients can declare themselves
"terminatable", so that the Xserver could simply ignore those X11
clients when checking the remaining clients and terminate itself
automatically.
Use that mechanism to declare mutter's own connection to the Xserver as
"terminatable" when Xwayland is started on demand so that it won't hold
Xwayland alive for the sole purpose of mutter itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1794>
2021-03-17 14:44:45 +00:00
|
|
|
have_xwayland_terminate_delay = false
|
2023-01-09 14:40:03 +00:00
|
|
|
have_xwayland_byte_swapped_clients = false
|
2023-09-29 09:00:37 +00:00
|
|
|
have_xwayland_enable_ei_portal = false
|
2022-03-25 10:50:52 +00:00
|
|
|
if have_xwayland
|
2020-12-15 09:19:05 +00:00
|
|
|
xwayland_dep = dependency('xwayland', required: false)
|
|
|
|
|
2018-12-01 04:02:05 +00:00
|
|
|
xwayland_path = get_option('xwayland_path')
|
|
|
|
if xwayland_path == ''
|
2020-12-15 09:19:05 +00:00
|
|
|
if xwayland_dep.found()
|
2022-11-19 01:16:04 +00:00
|
|
|
xwayland_path = xwayland_dep.get_variable('xwayland')
|
2020-12-15 09:19:05 +00:00
|
|
|
else
|
2024-03-04 16:51:30 +00:00
|
|
|
xwayland_path = find_program('Xwayland').full_path()
|
2020-12-15 09:19:05 +00:00
|
|
|
endif
|
2018-12-01 04:02:05 +00:00
|
|
|
endif
|
|
|
|
cdata.set_quoted('XWAYLAND_PATH', xwayland_path)
|
2019-06-20 10:11:29 +00:00
|
|
|
|
|
|
|
# For Xwayland authority file generation.
|
|
|
|
if cc.has_header_symbol('sys/random.h', 'getrandom')
|
|
|
|
cdata.set('HAVE_SYS_RANDOM', 1)
|
|
|
|
elif cc.has_header_symbol('linux/random.h', 'getrandom')
|
|
|
|
cdata.set('HAVE_LINUX_RANDOM', 1)
|
|
|
|
else
|
|
|
|
error('Required function getrandom not found')
|
|
|
|
endif
|
2019-07-19 20:50:31 +00:00
|
|
|
|
|
|
|
# For Xwayland -initfd usage
|
|
|
|
use_initfd = get_option('xwayland_initfd')
|
2020-12-15 09:19:05 +00:00
|
|
|
if xwayland_dep.found()
|
2022-11-19 01:16:04 +00:00
|
|
|
xwayland_supports_initfd = xwayland_dep.get_variable('have_initfd') == 'true'
|
2020-12-15 09:19:05 +00:00
|
|
|
else
|
2024-03-04 16:56:16 +00:00
|
|
|
xwayland_options = run_command(xwayland_path, '-help', check: false)
|
2020-12-15 09:19:05 +00:00
|
|
|
xwayland_supports_initfd = xwayland_options.stderr().contains('-initfd')
|
|
|
|
endif
|
|
|
|
|
2019-07-19 20:50:31 +00:00
|
|
|
if use_initfd.auto()
|
2020-12-15 09:19:05 +00:00
|
|
|
have_xwayland_initfd = xwayland_supports_initfd
|
2019-07-19 20:50:31 +00:00
|
|
|
else
|
|
|
|
have_xwayland_initfd = use_initfd.enabled()
|
2020-12-15 09:19:05 +00:00
|
|
|
if have_xwayland_initfd and not xwayland_supports_initfd
|
2020-03-03 14:26:06 +00:00
|
|
|
error('XWayland -initfd support requested but not available')
|
|
|
|
endif
|
2019-07-19 20:50:31 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if (have_xwayland_initfd)
|
|
|
|
cdata.set('HAVE_XWAYLAND_INITFD', 1)
|
|
|
|
endif
|
2021-01-22 10:16:24 +00:00
|
|
|
|
|
|
|
# For Xwayland -listenfd usage
|
|
|
|
if xwayland_dep.found()
|
2022-11-19 01:16:04 +00:00
|
|
|
have_xwayland_listenfd = xwayland_dep.get_variable('have_listenfd') == 'true'
|
2021-01-22 10:16:24 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if (have_xwayland_listenfd)
|
|
|
|
cdata.set('HAVE_XWAYLAND_LISTENFD', 1)
|
|
|
|
endif
|
xwayland: Mark our X11 connection terminatable
The connection to the Xserver for the X11 window manager part of mutter
even on Wayland may prevent the Xserver from shutting down.
Currently, what mutter does is to check the X11 clients still connected
to Xwayland using the XRes extension, with a list of X11 clients that
can be safely ignored (typically the GNOME XSettings daemon, the IBus
daemon, pulseaudio and even mutter window manager itself).
When there is just those known clients remaining, mutter would kill
Xwayland automatically.
But that's racy, because between the time mutter checks with Xwayland
the remaining clients and the time it actually kills the process, a new
X11 client might have come along and won't be able to connect to
Xwayland that mutter is just about to kill.
Because of that, the feature “autoclose-xwayland” is marked as an
experimental feature in mutter and not enabled by default.
Thankfully, the Xserver has all it takes to manage that already, and
is even capable of terminating itself once all X11 clients are gone (the
-terminate option on the command line).
With XFixes version 6, the X11 clients can declare themselves
"terminatable", so that the Xserver could simply ignore those X11
clients when checking the remaining clients and terminate itself
automatically.
Use that mechanism to declare mutter's own connection to the Xserver as
"terminatable" when Xwayland is started on demand so that it won't hold
Xwayland alive for the sole purpose of mutter itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1794>
2021-03-17 14:44:45 +00:00
|
|
|
|
|
|
|
# For Xwayland -listenfd usage
|
|
|
|
if xwayland_dep.found()
|
2022-11-19 01:16:04 +00:00
|
|
|
have_xwayland_terminate_delay = xwayland_dep.get_variable('have_terminate_delay') == 'true'
|
xwayland: Mark our X11 connection terminatable
The connection to the Xserver for the X11 window manager part of mutter
even on Wayland may prevent the Xserver from shutting down.
Currently, what mutter does is to check the X11 clients still connected
to Xwayland using the XRes extension, with a list of X11 clients that
can be safely ignored (typically the GNOME XSettings daemon, the IBus
daemon, pulseaudio and even mutter window manager itself).
When there is just those known clients remaining, mutter would kill
Xwayland automatically.
But that's racy, because between the time mutter checks with Xwayland
the remaining clients and the time it actually kills the process, a new
X11 client might have come along and won't be able to connect to
Xwayland that mutter is just about to kill.
Because of that, the feature “autoclose-xwayland” is marked as an
experimental feature in mutter and not enabled by default.
Thankfully, the Xserver has all it takes to manage that already, and
is even capable of terminating itself once all X11 clients are gone (the
-terminate option on the command line).
With XFixes version 6, the X11 clients can declare themselves
"terminatable", so that the Xserver could simply ignore those X11
clients when checking the remaining clients and terminate itself
automatically.
Use that mechanism to declare mutter's own connection to the Xserver as
"terminatable" when Xwayland is started on demand so that it won't hold
Xwayland alive for the sole purpose of mutter itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1794>
2021-03-17 14:44:45 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if (have_xwayland_terminate_delay)
|
|
|
|
cdata.set('HAVE_XWAYLAND_TERMINATE_DELAY', 1)
|
|
|
|
endif
|
2023-01-09 14:40:03 +00:00
|
|
|
|
|
|
|
# For Xwayland +/-byteswappedclients usage
|
|
|
|
if xwayland_dep.found()
|
|
|
|
have_xwayland_byte_swapped_clients = xwayland_dep.get_variable('have_byteswappedclients',
|
|
|
|
default_value: 'false') == 'true'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if (have_xwayland_byte_swapped_clients)
|
|
|
|
cdata.set('HAVE_XWAYLAND_BYTE_SWAPPED_CLIENTS', 1)
|
|
|
|
endif
|
2023-09-29 09:00:37 +00:00
|
|
|
|
|
|
|
# For Xwayland -enable-portal usage
|
|
|
|
if xwayland_dep.found()
|
|
|
|
have_xwayland_enable_ei_portal = xwayland_dep.get_variable('have_enable_ei_portal',
|
|
|
|
default_value: 'false') == 'true'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if (have_xwayland_enable_ei_portal)
|
|
|
|
cdata.set('HAVE_XWAYLAND_ENABLE_EI_PORTAL', 1)
|
|
|
|
endif
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
endif
|
|
|
|
|
2020-01-17 22:43:24 +00:00
|
|
|
optional_functions = [
|
|
|
|
'mkostemp',
|
|
|
|
'posix_fallocate',
|
|
|
|
'memfd_create',
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach function : optional_functions
|
|
|
|
if cc.has_function(function)
|
|
|
|
cdata.set('HAVE_' + function.to_upper(), 1)
|
|
|
|
else
|
|
|
|
message('Optional function ' + function + ' missing')
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
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)
|
|
|
|
|
2023-05-04 11:49:59 +00:00
|
|
|
cdata.set_quoted('MUTTER_PLUGIN_DIR', pkglibdir / 'plugins')
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
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('.')
|
|
|
|
|
2023-07-18 15:58:47 +00:00
|
|
|
subdir('mtk')
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
subdir('cogl')
|
|
|
|
subdir('clutter')
|
|
|
|
subdir('data')
|
2022-06-01 11:30:27 +00:00
|
|
|
subdir('tools')
|
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'.
2018-05-22 13:55:35 +00:00
|
|
|
subdir('src')
|
|
|
|
subdir('po')
|
|
|
|
subdir('doc/man')
|
2022-01-19 20:26:30 +00:00
|
|
|
if have_documentation
|
|
|
|
subdir('doc/reference')
|
|
|
|
endif
|
2018-12-17 15:39:54 +00:00
|
|
|
|
2022-11-19 00:51:27 +00:00
|
|
|
gnome.post_install(
|
|
|
|
glib_compile_schemas: true,
|
|
|
|
)
|
|
|
|
|
2021-08-31 09:46:57 +00:00
|
|
|
meson.add_dist_script('meson/check-version.py', meson.project_version(), 'NEWS')
|
2019-08-27 09:30:14 +00:00
|
|
|
|
2021-10-06 18:34:03 +00:00
|
|
|
summary('prefix', prefix, section: 'Directories')
|
|
|
|
summary('libexecdir', libexecdir, section: 'Directories')
|
|
|
|
summary('pkgdatadir', pkgdatadir, section: 'Directories')
|
|
|
|
|
|
|
|
summary('buildtype', get_option('buildtype'), section: 'Build Configuration')
|
|
|
|
summary('debug', get_option('debug'), section: 'Build Configuration')
|
2021-08-05 13:48:07 +00:00
|
|
|
|
|
|
|
summary('OpenGL', have_gl, section: 'Rendering APIs')
|
|
|
|
summary('GLES2', have_gles2, section: 'Rendering APIs')
|
|
|
|
summary('EGL', have_egl, section: 'Rendering APIs')
|
|
|
|
summary('GLX', have_glx, section: 'Rendering APIs')
|
|
|
|
|
|
|
|
summary('Wayland', have_wayland, section: 'Options')
|
|
|
|
summary('Wayland EGLStream', have_wayland_eglstream, section: 'Options')
|
2022-03-25 10:50:52 +00:00
|
|
|
summary('X11', have_x11, section: 'Options')
|
|
|
|
summary('XWayland', have_xwayland, section: 'Options')
|
2021-08-05 13:48:07 +00:00
|
|
|
summary('Native Backend', have_native_backend, section: 'Options')
|
|
|
|
summary('EGL Device', have_egl_device, section: 'Options')
|
|
|
|
summary('Remote desktop', have_remote_desktop, section: 'Options')
|
2022-03-03 10:51:00 +00:00
|
|
|
summary('libgnome-desktop', have_gnome_desktop, section: 'Options')
|
2023-03-07 05:21:19 +00:00
|
|
|
summary('libdisplay-info', have_libdisplay_info, section: 'Options')
|
2022-04-26 13:00:46 +00:00
|
|
|
summary('Sound player', have_sound_player, section: 'Options')
|
2021-08-05 13:48:07 +00:00
|
|
|
summary('gudev', have_libgudev, section: 'Options')
|
|
|
|
summary('Wacom', have_libwacom, section: 'Options')
|
|
|
|
summary('SM', have_sm, section: 'Options')
|
|
|
|
summary('Startup notification', have_startup_notification, section: 'Options')
|
|
|
|
summary('Introspection', have_introspection, section: 'Options')
|
2022-01-19 20:26:30 +00:00
|
|
|
summary('Documentation', have_documentation, section: 'Options')
|
2021-08-05 13:48:07 +00:00
|
|
|
summary('Profiler', have_profiler, section: 'Options')
|
|
|
|
summary('Xwayland initfd', have_xwayland_initfd, section: 'Options')
|
|
|
|
summary('Xwayland listenfd', have_xwayland_listenfd, section: 'Options')
|
xwayland: Mark our X11 connection terminatable
The connection to the Xserver for the X11 window manager part of mutter
even on Wayland may prevent the Xserver from shutting down.
Currently, what mutter does is to check the X11 clients still connected
to Xwayland using the XRes extension, with a list of X11 clients that
can be safely ignored (typically the GNOME XSettings daemon, the IBus
daemon, pulseaudio and even mutter window manager itself).
When there is just those known clients remaining, mutter would kill
Xwayland automatically.
But that's racy, because between the time mutter checks with Xwayland
the remaining clients and the time it actually kills the process, a new
X11 client might have come along and won't be able to connect to
Xwayland that mutter is just about to kill.
Because of that, the feature “autoclose-xwayland” is marked as an
experimental feature in mutter and not enabled by default.
Thankfully, the Xserver has all it takes to manage that already, and
is even capable of terminating itself once all X11 clients are gone (the
-terminate option on the command line).
With XFixes version 6, the X11 clients can declare themselves
"terminatable", so that the Xserver could simply ignore those X11
clients when checking the remaining clients and terminate itself
automatically.
Use that mechanism to declare mutter's own connection to the Xserver as
"terminatable" when Xwayland is started on demand so that it won't hold
Xwayland alive for the sole purpose of mutter itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1794>
2021-03-17 14:44:45 +00:00
|
|
|
summary('Xwayland terminate delay', have_xwayland_terminate_delay, section: 'Options')
|
2023-01-09 14:40:03 +00:00
|
|
|
summary('Xwayland byte-swapped clients', have_xwayland_byte_swapped_clients, section: 'Options')
|
2023-09-29 09:00:37 +00:00
|
|
|
summary('Xwayland enable EI portal', have_xwayland_enable_ei_portal, section: 'Options')
|
2021-08-05 13:48:07 +00:00
|
|
|
|
|
|
|
summary('Enabled', have_tests, section: 'Tests')
|
2024-06-18 14:08:37 +00:00
|
|
|
summary('Mutter tests', have_mutter_tests, section: 'Tests')
|
2021-08-05 13:48:07 +00:00
|
|
|
summary('Cogl tests', have_cogl_tests, section: 'Tests')
|
|
|
|
summary('Clutter tests', have_clutter_tests, section: 'Tests')
|
2024-06-18 14:07:57 +00:00
|
|
|
summary('KVM tests', have_kvm_tests, section: 'Tests')
|
2024-06-15 20:39:09 +00:00
|
|
|
summary('X11 backend', have_x11_tests, section: 'Tests')
|
2021-08-05 13:48:07 +00:00
|
|
|
summary('Installed tests', have_installed_tests, section: 'Tests')
|
|
|
|
summary('Coverage', get_option('b_coverage'), section: 'Tests')
|