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 09:55:35 -04:00
|
|
|
project('mutter', 'c',
|
2021-02-22 09:52:04 -05:00
|
|
|
version: '40.rc',
|
2020-07-04 15:01:28 -04:00
|
|
|
meson_version: '>= 0.51.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 09:55:35 -04:00
|
|
|
license: 'GPLv2+'
|
|
|
|
)
|
|
|
|
|
2019-07-23 14:26:14 -04:00
|
|
|
split_version = meson.project_version().split('.')
|
|
|
|
|
|
|
|
# Automatically increase API version each development cycle,
|
|
|
|
# starting with 0 in 3.23.x
|
2020-10-05 09:24:30 -04:00
|
|
|
api_version = split_version[0].to_int() - 32
|
2019-07-23 14:26:14 -04:00
|
|
|
libmutter_api_version = '@0@'.format(api_version)
|
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 09:55:35 -04:00
|
|
|
|
|
|
|
# generic version requirements
|
2019-05-17 19:11:43 -04:00
|
|
|
fribidi_req = '>= 1.0.0'
|
2021-02-04 12:45:59 -05:00
|
|
|
glib_req = '>= 2.67.3'
|
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 09:55:35 -04:00
|
|
|
gi_req = '>= 0.9.5'
|
2020-09-20 17:38:17 -04: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 09:55:35 -04:00
|
|
|
gtk3_req = '>= 3.19.8'
|
|
|
|
gdk_pixbuf_req = '>= 2.0'
|
|
|
|
uprof_req = '>= 0.3'
|
2020-11-22 08:42:35 -05: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 09:55:35 -04:00
|
|
|
cairo_req = '>= 1.10.0'
|
|
|
|
pangocairo_req = '>= 1.20'
|
2021-01-14 06:38:01 -05:00
|
|
|
gsettings_desktop_schemas_req = '>= 40.alpha'
|
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 09:55:35 -04:00
|
|
|
json_glib_req = '>= 0.12.0'
|
|
|
|
upower_glib_req = '>= 0.99.0'
|
|
|
|
xcomposite_req = '>= 0.4'
|
|
|
|
xkbcommon_req = '>= 0.4.3'
|
|
|
|
xfixes_req = '>= 3'
|
2019-09-01 08:02:01 -04: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 09:55:35 -04:00
|
|
|
xrandr_req = '>= 1.5.0'
|
|
|
|
libstartup_notification_req = '>= 0.7'
|
2019-01-08 09:59:57 -05: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 09:55:35 -04:00
|
|
|
libwacom_req = '>= 0.13'
|
|
|
|
atk_req = '>= 2.5.3'
|
|
|
|
|
|
|
|
# optional version requirements
|
2018-11-06 13:48:47 -05:00
|
|
|
udev_req = '>= 228'
|
2018-11-06 14:04:12 -05: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 09:55:35 -04:00
|
|
|
|
|
|
|
# wayland version requirements
|
2019-09-18 12:38:22 -04:00
|
|
|
wayland_server_req = '>= 1.18'
|
2020-02-14 05:11:10 -05:00
|
|
|
wayland_protocols_req = '>= 1.19'
|
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 09:55:35 -04:00
|
|
|
|
|
|
|
# native backend version requirements
|
2020-09-07 21:08:05 -04:00
|
|
|
libinput_req = '>= 1.15.0'
|
2020-09-01 09:20:27 -04:00
|
|
|
gbm_req = '>= 17.3'
|
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 09:55:35 -04:00
|
|
|
|
|
|
|
# screen cast version requirements
|
2021-02-04 07:18:00 -05:00
|
|
|
libpipewire_req = '>= 0.3.21'
|
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 09:55:35 -04:00
|
|
|
|
2019-12-04 17:25:41 -05:00
|
|
|
# profiler requirements
|
2020-07-04 15:01:28 -04:00
|
|
|
sysprof_req = '>= 3.37.2'
|
2019-12-04 17:25:41 -05: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 09:55:35 -04:00
|
|
|
gnome = import('gnome')
|
|
|
|
pkg = import('pkgconfig')
|
|
|
|
i18n = import('i18n')
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
|
|
|
prefix = get_option('prefix')
|
|
|
|
|
|
|
|
bindir = join_paths(prefix, get_option('bindir'))
|
|
|
|
datadir = join_paths(prefix, get_option('datadir'))
|
|
|
|
libdir = join_paths(prefix, get_option('libdir'))
|
|
|
|
libexecdir = join_paths(prefix, get_option('libexecdir'))
|
|
|
|
includedir = join_paths(prefix, get_option('includedir'))
|
|
|
|
sysconfdir = get_option('sysconfdir')
|
|
|
|
|
|
|
|
pkgname = '@0@-@1@'.format(meson.project_name(), libmutter_api_version)
|
|
|
|
|
|
|
|
pkgdatadir = join_paths(datadir, pkgname)
|
|
|
|
pkglibdir = join_paths(libdir, pkgname)
|
|
|
|
pkgincludedir = join_paths(includedir, pkgname)
|
|
|
|
|
2019-01-08 16:28:18 -05:00
|
|
|
pcdir = join_paths(libdir, 'pkgconfig')
|
|
|
|
|
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 09:55:35 -04:00
|
|
|
gettext_package = meson.project_name()
|
|
|
|
localedir = join_paths(datadir, 'locale')
|
|
|
|
|
2018-12-20 09:29:59 -05:00
|
|
|
libmutter_name = 'mutter-' + libmutter_api_version
|
|
|
|
|
2018-12-17 10:26:07 -05:00
|
|
|
mutter_installed_tests_datadir = join_paths(
|
|
|
|
datadir, 'installed-tests', libmutter_name)
|
|
|
|
|
|
|
|
mutter_installed_tests_libexecdir = join_paths(
|
|
|
|
libexecdir, 'installed-tests', libmutter_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 09:55:35 -04:00
|
|
|
m_dep = cc.find_library('m', required: true)
|
|
|
|
x11_dep = dependency('x11')
|
2019-02-15 11:22:25 -05:00
|
|
|
graphene_dep = dependency('graphene-gobject-1.0', version: graphene_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 09:55:35 -04:00
|
|
|
gtk3_dep = dependency('gtk+-3.0', version: gtk3_req)
|
|
|
|
gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0')
|
|
|
|
pango_dep = dependency('pango', version: pango_req)
|
|
|
|
cairo_dep = dependency('cairo', version: cairo_req)
|
|
|
|
cairo_gobject_dep = dependency('cairo-gobject', version: cairo_req)
|
|
|
|
pangocairo_dep = dependency('pangocairo', version: pangocairo_req)
|
2019-05-17 19:11:43 -04: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 09:55:35 -04: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)
|
|
|
|
gnome_settings_daemon_dep = dependency('gnome-settings-daemon')
|
|
|
|
json_glib_dep = dependency('json-glib-1.0', version: json_glib_req)
|
|
|
|
gnome_desktop_dep = dependency('gnome-desktop-3.0')
|
|
|
|
xcomposite_dep = dependency('xcomposite', version: xcomposite_req)
|
|
|
|
xcursor_dep = dependency('xcursor')
|
|
|
|
xdamage_dep = dependency('xdamage')
|
|
|
|
xext_dep = dependency('xext')
|
|
|
|
xfixes_dep = dependency('xfixes', version: xfixes_req)
|
|
|
|
xi_dep = dependency('xi', version: xi_req)
|
|
|
|
xtst_dep = dependency('xtst')
|
|
|
|
xkbfile_dep = dependency('xkbfile')
|
|
|
|
xkeyboard_config_dep = dependency('xkeyboard-config')
|
|
|
|
xkbcommon_dep = dependency('xkbcommon', version: xkbcommon_req)
|
|
|
|
xkbcommon_x11_dep = dependency('xkbcommon-x11')
|
|
|
|
xrender_dep = dependency('xrender')
|
|
|
|
x11_xcb_dep = dependency('x11-xcb')
|
|
|
|
xrandr_dep = dependency('xrandr', version: xrandr_req)
|
|
|
|
xcb_randr_dep = dependency('xcb-randr')
|
|
|
|
xcb_res_dep = dependency('xcb-res')
|
|
|
|
xinerama_dep = dependency('xinerama')
|
2019-06-18 10:12:46 -04:00
|
|
|
xau_dep = dependency('xau')
|
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 09:55:35 -04:00
|
|
|
ice_dep = dependency('ice')
|
|
|
|
atk_dep = dependency('atk', version: atk_req)
|
2019-01-08 09:59:57 -05:00
|
|
|
libcanberra_dep = dependency('libcanberra', version: libcanberra_req)
|
2020-02-26 10:08:56 -05:00
|
|
|
dbus_dep = dependency('dbus-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 09:55:35 -04:00
|
|
|
|
|
|
|
# For now always require X11 support
|
|
|
|
have_x11 = true
|
|
|
|
|
|
|
|
have_gl = get_option('opengl')
|
|
|
|
if have_gl
|
|
|
|
gl_dep = dependency('gl')
|
|
|
|
gl_libname = get_option('opengl_libname')
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_egl = get_option('egl')
|
|
|
|
if have_egl
|
|
|
|
egl_dep = dependency('egl')
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_glx = get_option('glx')
|
|
|
|
if have_glx
|
|
|
|
if not have_gl
|
|
|
|
error('GLX support requires OpenGL to be enabled')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_egl_xlib = have_egl and have_x11
|
|
|
|
|
|
|
|
have_gles2 = get_option('gles2')
|
|
|
|
if have_gles2
|
|
|
|
gles2_dep = dependency('glesv2')
|
|
|
|
gles2_libname = get_option('gles2_libname')
|
|
|
|
|
|
|
|
if not have_egl
|
|
|
|
error('GLESv2 support requires EGL to be enabled')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_wayland = get_option('wayland')
|
|
|
|
if have_wayland
|
|
|
|
wayland_server_dep = dependency('wayland-server', version: wayland_server_req)
|
2019-12-06 13:05:32 -05:00
|
|
|
wayland_client_dep = dependency('wayland-client', version: wayland_server_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 09:55:35 -04: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 14:04:12 -05:00
|
|
|
gudev_dep = dependency('gudev-1.0', version: gudev_req)
|
2020-09-14 14:36:17 -04:00
|
|
|
udev_dep = dependency('udev')
|
|
|
|
udevdir = udev_dep.get_pkgconfig_variable('udevdir')
|
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 09:55:35 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
have_native_backend = get_option('native_backend')
|
|
|
|
if have_native_backend
|
|
|
|
libdrm_dep = dependency('libdrm')
|
|
|
|
libgbm_dep = dependency('gbm', version: gbm_req)
|
|
|
|
libinput_dep = dependency('libinput', version: libinput_req)
|
|
|
|
|
2019-03-11 15:49:41 -04:00
|
|
|
libsystemd_dep = dependency('libsystemd', 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 09:55:35 -04:00
|
|
|
if libsystemd_dep.found()
|
|
|
|
logind_provider_dep = libsystemd_dep
|
|
|
|
else
|
|
|
|
logind_provider_dep = dependency('libelogind')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not have_egl
|
|
|
|
error('The native backend requires EGL to be enabled')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not have_gles2
|
|
|
|
error('The native backend requires GLESv2 to be enabled')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not have_libgudev
|
|
|
|
error('The native backend requires udev to be enabled')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_egl_device = get_option('egl_device')
|
|
|
|
|
|
|
|
have_wayland_eglstream = get_option('wayland_eglstream')
|
|
|
|
if have_wayland_eglstream
|
|
|
|
wayland_eglstream_protocols_dep = dependency('wayland-eglstream-protocols')
|
|
|
|
dl_dep = cc.find_library('dl', required: true)
|
|
|
|
|
|
|
|
if not have_wayland
|
|
|
|
error('Wayland EGLStream support requires Wayland to be enabled')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_sm = get_option('sm')
|
|
|
|
if have_sm
|
|
|
|
sm_dep = dependency('sm')
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_libwacom = get_option('libwacom')
|
|
|
|
if have_libwacom
|
|
|
|
libwacom_dep = dependency('libwacom', version: libwacom_req)
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_pango_ft2 = get_option('pango_ft2')
|
|
|
|
if have_pango_ft2
|
|
|
|
pangoft2_dep = dependency('pangoft2')
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_startup_notification = get_option('startup_notification')
|
|
|
|
if have_startup_notification
|
|
|
|
libstartup_notification_dep = dependency('libstartup-notification-1.0',
|
|
|
|
version: libstartup_notification_req)
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_remote_desktop = get_option('remote_desktop')
|
|
|
|
if have_remote_desktop
|
2020-01-14 03:44:45 -05: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 09:55:35 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
have_introspection = get_option('introspection')
|
|
|
|
if have_introspection
|
|
|
|
gobject_introspection_dep = dependency('gobject-introspection-1.0')
|
2018-12-22 05:28:46 -05:00
|
|
|
|
|
|
|
introspection_args = [
|
|
|
|
'--quiet',
|
|
|
|
'-U_GNU_SOURCE',
|
|
|
|
]
|
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 09:55:35 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
have_tests = get_option('tests')
|
2019-02-13 12:51:21 -05:00
|
|
|
have_core_tests = false
|
|
|
|
have_cogl_tests = false
|
|
|
|
have_clutter_tests = false
|
2021-01-19 11:48:04 -05:00
|
|
|
have_native_tests = false
|
2019-02-13 12:51:21 -05:00
|
|
|
have_installed_tests = 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 09:55:35 -04:00
|
|
|
if have_tests
|
2019-02-13 12:51:21 -05:00
|
|
|
have_core_tests = get_option('core_tests')
|
|
|
|
if have_core_tests
|
|
|
|
if not have_wayland
|
|
|
|
error('Tests require Wayland to be 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 09:55:35 -04:00
|
|
|
endif
|
2021-01-19 11:48:04 -05:00
|
|
|
have_native_tests = get_option('native_tests')
|
|
|
|
if have_native_tests
|
|
|
|
if not have_native_backend
|
|
|
|
error('Native tests require the native backend')
|
|
|
|
endif
|
2021-02-01 14:32:27 -05:00
|
|
|
if not have_remote_desktop
|
|
|
|
error('Native tests require remote desktop')
|
|
|
|
endif
|
2021-01-19 11:48:04 -05:00
|
|
|
endif
|
2019-02-13 12:51:21 -05:00
|
|
|
|
|
|
|
have_cogl_tests = get_option('cogl_tests')
|
|
|
|
have_clutter_tests = get_option('clutter_tests')
|
|
|
|
have_installed_tests = get_option('installed_tests')
|
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 09:55:35 -04:00
|
|
|
endif
|
|
|
|
|
2018-05-15 11:31:29 -04:00
|
|
|
have_profiler = get_option('profiler')
|
|
|
|
if have_profiler
|
2020-07-04 15:01:28 -04:00
|
|
|
# libsysprof-capture support
|
|
|
|
sysprof_dep = dependency('sysprof-capture-4',
|
|
|
|
required: true,
|
|
|
|
default_options: [
|
|
|
|
'enable_examples=false',
|
|
|
|
'enable_gtk=false',
|
|
|
|
'enable_tests=false',
|
|
|
|
'enable_tools=false',
|
|
|
|
'libsysprof=false',
|
|
|
|
'with_sysprofd=none',
|
|
|
|
'help=false',
|
|
|
|
],
|
|
|
|
fallback: ['sysprof', 'libsysprof_capture_dep'],
|
|
|
|
)
|
2018-05-15 11:31:29 -04: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 09:55:35 -04:00
|
|
|
required_functions = [
|
|
|
|
'ffs',
|
|
|
|
'clz',
|
2019-06-17 17:20:10 -04: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 09:55:35 -04:00
|
|
|
]
|
|
|
|
foreach function : required_functions
|
|
|
|
if not cc.has_function(function)
|
|
|
|
error('Required function ' + function + ' missing')
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2019-09-09 05:17:22 -04: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 09:55:35 -04:00
|
|
|
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
|
|
|
|
2019-04-29 06:44:16 -04:00
|
|
|
buildtype = get_option('buildtype')
|
|
|
|
if buildtype != 'plain'
|
|
|
|
all_warnings = [
|
|
|
|
'-fno-strict-aliasing',
|
|
|
|
'-Wpointer-arith',
|
|
|
|
'-Wmissing-declarations',
|
|
|
|
'-Wimplicit-function-declaration',
|
|
|
|
'-Wformat=2',
|
|
|
|
'-Wformat-nonliteral',
|
|
|
|
'-Wformat-security',
|
|
|
|
'-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',
|
|
|
|
]
|
|
|
|
supported_warnings = cc.get_supported_arguments(all_warnings)
|
|
|
|
add_project_arguments(supported_warnings, language: 'c')
|
|
|
|
endif
|
2019-01-20 11:44:22 -05:00
|
|
|
|
2019-03-17 09:35:56 -04:00
|
|
|
if get_option('debug')
|
|
|
|
debug_c_args = [
|
|
|
|
'-DG_ENABLE_DEBUG',
|
|
|
|
'-fno-omit-frame-pointer'
|
|
|
|
]
|
|
|
|
supported_debug_c_args = cc.get_supported_arguments(debug_c_args)
|
|
|
|
add_project_arguments(supported_debug_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 09:55:35 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
cc.compiles('void main (void) { __builtin_ffsl (0); __builtin_popcountl (0); }')
|
|
|
|
|
|
|
|
cdata = configuration_data()
|
|
|
|
cdata.set_quoted('GETTEXT_PACKAGE', gettext_package)
|
|
|
|
cdata.set_quoted('VERSION', meson.project_version())
|
|
|
|
cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
|
|
|
|
|
|
|
cdata.set('HAVE_EGL', have_egl)
|
|
|
|
cdata.set('HAVE_WAYLAND', have_wayland)
|
|
|
|
cdata.set('HAVE_NATIVE_BACKEND', have_native_backend)
|
|
|
|
cdata.set('HAVE_REMOTE_DESKTOP', have_remote_desktop)
|
|
|
|
cdata.set('HAVE_EGL_DEVICE', have_egl_device)
|
|
|
|
cdata.set('HAVE_WAYLAND_EGLSTREAM', have_wayland_eglstream)
|
|
|
|
cdata.set('HAVE_LIBGUDEV', have_libgudev)
|
|
|
|
cdata.set('HAVE_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 11:42:27 -04:00
|
|
|
cdata.set('HAVE_PROFILER', have_profiler)
|
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 09:55:35 -04:00
|
|
|
|
|
|
|
xkb_base = xkeyboard_config_dep.get_pkgconfig_variable('xkb_base')
|
|
|
|
cdata.set_quoted('XKB_BASE', xkb_base)
|
|
|
|
|
2019-09-27 04:15:48 -04:00
|
|
|
if cc.has_header_symbol('sys/prctl.h', 'prctl')
|
|
|
|
cdata.set('HAVE_SYS_PRCTL', 1)
|
|
|
|
endif
|
|
|
|
|
2019-07-19 16:50:31 -04:00
|
|
|
have_xwayland_initfd = false
|
2021-01-22 05:16:24 -05:00
|
|
|
have_xwayland_listenfd = false
|
2018-11-30 23:02:05 -05:00
|
|
|
if have_wayland
|
2020-12-15 04:19:05 -05:00
|
|
|
xwayland_dep = dependency('xwayland', required: false)
|
|
|
|
|
2018-11-30 23:02:05 -05:00
|
|
|
xwayland_path = get_option('xwayland_path')
|
|
|
|
if xwayland_path == ''
|
2020-12-15 04:19:05 -05:00
|
|
|
if xwayland_dep.found()
|
|
|
|
xwayland_path = xwayland_dep.get_pkgconfig_variable('xwayland')
|
|
|
|
else
|
|
|
|
xwayland_path = find_program('Xwayland').path()
|
|
|
|
endif
|
2018-11-30 23:02:05 -05:00
|
|
|
endif
|
|
|
|
cdata.set_quoted('XWAYLAND_PATH', xwayland_path)
|
2019-06-20 06:11:29 -04: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 16:50:31 -04:00
|
|
|
|
|
|
|
# For Xwayland -initfd usage
|
|
|
|
use_initfd = get_option('xwayland_initfd')
|
2020-12-15 04:19:05 -05:00
|
|
|
if xwayland_dep.found()
|
|
|
|
xwayland_supports_initfd = xwayland_dep.get_pkgconfig_variable('have_initfd') == 'true'
|
|
|
|
else
|
|
|
|
xwayland_options = run_command(xwayland_path, '-help')
|
|
|
|
xwayland_supports_initfd = xwayland_options.stderr().contains('-initfd')
|
|
|
|
endif
|
|
|
|
|
2019-07-19 16:50:31 -04:00
|
|
|
if use_initfd.auto()
|
2020-12-15 04:19:05 -05:00
|
|
|
have_xwayland_initfd = xwayland_supports_initfd
|
2019-07-19 16:50:31 -04:00
|
|
|
else
|
|
|
|
have_xwayland_initfd = use_initfd.enabled()
|
2020-12-15 04:19:05 -05:00
|
|
|
if have_xwayland_initfd and not xwayland_supports_initfd
|
2020-03-03 09:26:06 -05:00
|
|
|
error('XWayland -initfd support requested but not available')
|
|
|
|
endif
|
2019-07-19 16:50:31 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if (have_xwayland_initfd)
|
|
|
|
cdata.set('HAVE_XWAYLAND_INITFD', 1)
|
|
|
|
endif
|
2021-01-22 05:16:24 -05:00
|
|
|
|
|
|
|
# For Xwayland -listenfd usage
|
|
|
|
if xwayland_dep.found()
|
|
|
|
have_xwayland_listenfd = xwayland_dep.get_pkgconfig_variable('have_listenfd') == 'true'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if (have_xwayland_listenfd)
|
|
|
|
cdata.set('HAVE_XWAYLAND_LISTENFD', 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 09:55:35 -04:00
|
|
|
endif
|
|
|
|
|
2019-06-14 10:04:44 -04:00
|
|
|
have_xsetioerrorexithandler = false
|
|
|
|
if cc.has_function('XSetIOErrorExitHandler', dependencies: x11_dep,
|
|
|
|
prefix: '''#include <X11/Xlib.h>''')
|
|
|
|
have_xsetioerrorexithandler = true
|
|
|
|
cdata.set('HAVE_XSETIOERROREXITHANDLER', 1)
|
|
|
|
endif
|
|
|
|
|
2020-01-17 17:43:24 -05: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 09:55:35 -04: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)
|
|
|
|
|
xwayland: Check X11 clients prior to terminate Xwayland
Currently, mutter checks for the presence of X11 windows to decide
whether or not Xwayland can be terminated, when Xwayland is started on
demand.
Unfortunately, not all X11 clients will map a window all the time, an
X11 client may keep the X11 connection opened after closing all its
windows. In that case, we may terminate Xwayland while there are some
X11 client connected still, and terminating Xwayland will also kill
those X11 clients.
To avoid that issue, check the X11 clients actually connected using the
XRes extension. The XRes extension provides the PID of the (local) X11
clients connected to the Xserver, so we need to match that against the
actual executable names, and compare with a list of known executables
that we can safely ignore, such as ibus-x11 or gsd-xsettings.
We also check against our own executable name, considering that the X11
window manager is also an X11 client connected to the Xserver.
Also, XRes returning the PID of local clients only is not a problem
considering that Xwayland does not listen to remote connections.
However, if the user spawns a client remotely on another system using
ssh tunneling (ssh -X), only clients which actually map a window will
be accounted for.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1537
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1671>
2021-01-18 04:22:01 -05:00
|
|
|
xwayland_ignore_executables = get_option('xwayland_ignore_executables')
|
|
|
|
cdata.set_quoted('XWAYLAND_IGNORE_EXECUTABLES',
|
|
|
|
xwayland_ignore_executables)
|
|
|
|
|
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 09:55:35 -04:00
|
|
|
cdata.set_quoted('MUTTER_PLUGIN_DIR', join_paths(pkglibdir, 'plugins'))
|
|
|
|
cdata.set_quoted('MUTTER_LOCALEDIR', localedir)
|
|
|
|
cdata.set_quoted('MUTTER_LIBEXECDIR', libexecdir)
|
|
|
|
cdata.set_quoted('MUTTER_PKGDATADIR', pkgdatadir)
|
|
|
|
|
|
|
|
config_h = configure_file(
|
|
|
|
input: 'config.h.meson',
|
|
|
|
output: 'config.h',
|
|
|
|
configuration: cdata
|
|
|
|
)
|
|
|
|
|
|
|
|
top_includepath = include_directories('.')
|
|
|
|
|
|
|
|
subdir('cogl')
|
|
|
|
subdir('clutter')
|
|
|
|
subdir('data')
|
|
|
|
subdir('src')
|
|
|
|
subdir('po')
|
|
|
|
subdir('doc/man')
|
2018-12-17 10:39:54 -05:00
|
|
|
|
2019-08-27 05:30:14 -04:00
|
|
|
meson.add_install_script('meson/meson-postinstall.sh')
|
|
|
|
|
2018-12-17 10:39:54 -05:00
|
|
|
output = [
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
' Mutter ' + meson.project_version(),
|
|
|
|
' ===============',
|
|
|
|
'',
|
|
|
|
' Prefix....................... ' + prefix,
|
|
|
|
' libexecdir................... ' + libexecdir,
|
|
|
|
' pkgdatadir................... ' + pkgdatadir,
|
|
|
|
'',
|
|
|
|
' Rendering APIs:',
|
|
|
|
'',
|
|
|
|
' OpenGL................... ' + have_gl.to_string(),
|
|
|
|
' GLES2.................... ' + have_gles2.to_string(),
|
|
|
|
' EGL...................... ' + have_egl.to_string(),
|
|
|
|
' GLX...................... ' + have_glx.to_string(),
|
|
|
|
'',
|
|
|
|
' Options:',
|
|
|
|
'',
|
|
|
|
' Wayland.................. ' + have_wayland.to_string(),
|
2018-12-21 00:47:17 -05:00
|
|
|
' Wayland EGLStream........ ' + have_wayland_eglstream.to_string(),
|
2018-12-17 10:39:54 -05:00
|
|
|
' Native Backend........... ' + have_native_backend.to_string(),
|
|
|
|
' EGL Device............... ' + have_egl_device.to_string(),
|
|
|
|
' Remote desktop........... ' + have_remote_desktop.to_string(),
|
|
|
|
' gudev.................... ' + have_libgudev.to_string(),
|
|
|
|
' Wacom.................... ' + have_libwacom.to_string(),
|
|
|
|
' SM....................... ' + have_sm.to_string(),
|
|
|
|
' Startup notification..... ' + have_startup_notification.to_string(),
|
|
|
|
' Introspection............ ' + have_introspection.to_string(),
|
2018-05-15 11:31:29 -04:00
|
|
|
' Profiler................. ' + have_profiler.to_string(),
|
2019-07-19 16:50:31 -04:00
|
|
|
' Xwayland initfd.......... ' + have_xwayland_initfd.to_string(),
|
2021-01-22 05:16:24 -05:00
|
|
|
' Xwayland listenfd........ ' + have_xwayland_listenfd.to_string(),
|
2019-06-14 10:04:44 -04:00
|
|
|
' Safe X11 I/O errors...... ' + have_xsetioerrorexithandler.to_string(),
|
2018-12-17 10:39:54 -05:00
|
|
|
'',
|
|
|
|
' Tests:',
|
|
|
|
'',
|
|
|
|
' Enabled.................. ' + have_tests.to_string(),
|
2019-02-13 12:51:21 -05:00
|
|
|
' Core tests............... ' + have_core_tests.to_string(),
|
2018-12-17 10:39:54 -05:00
|
|
|
' Cogl tests............... ' + have_cogl_tests.to_string(),
|
|
|
|
' Clutter tests............ ' + have_clutter_tests.to_string(),
|
|
|
|
' Installed tests.......... ' + have_installed_tests.to_string(),
|
2020-05-06 09:35:41 -04:00
|
|
|
' Coverage................. ' + get_option('b_coverage').to_string(),
|
2018-12-17 10:39:54 -05:00
|
|
|
'',
|
|
|
|
' Now type \'ninja -C ' + meson.build_root() + '\' to build ' + meson.project_name(),
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
]
|
|
|
|
message('\n'.join(output))
|