aboutsummaryrefslogtreecommitdiffstats
path: root/src/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* build: Bump to meson version 0.64.0Sebastian Wick2025-11-271-1/+0
| | | | | | | | | | | | | | | | This version will be required in the next commit. Bumps the CI image to get the required version from the debian package instead of from pip. Removes the bindir builtin directory from pkgconfig.generate() which is deprecated since 0.62.0. It will be automatically included when referenced. Use `meson setup` everywhere instead of relying on deprecated automatic detection of the setup command. Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
* build: Add -lm to pkg-config dependenciesDaniel Stone2025-02-051-0/+2
| | | | | | | | | Now that wl_fixed_from_double() calls round() from a function declared in a header, our users need to explicitly pick that dependency up in order to avoid build errors. Signed-off-by: Daniel Stone <daniels@collabora.com> Closes: wayland/weston#991
* Consider pkgconfig sysroot for pkgdatadirAndreas Cord-Landwehr2024-01-191-3/+3
| | | | | | | For libs/cflags this is done automatically, but not for manually accessed variables. This matches what wayland-protocols does. Signed-off-by: Andreas Cord-Landwehr <cordlandwehr@kde.org>
* build: override wayland-scanner depSimon Ser2023-05-091-0/+3
| | | | | | This allows a parent project to find wayland-scanner. Signed-off-by: Simon Ser <contact@emersion.fr>
* Meson: Override wayland-scanner if it can be runXavier Claessens2022-05-241-0/+4
| | | | | | | This allows projects to use Wayland as a Meson subproject and get the wayland-scanner executable when doing find_program('wayland-scanner'). Signed-off-by: Xavier Claessens <xavier.claessens@collabora.com>
* build: sanity check optionsSimon Ser2022-05-101-0/+4
| | | | | | | | Fail when tests/documentation is enabled without libraries. Fail when neither scanner nor libraries is enabled, because we don't build anything in that case. Signed-off-by: Simon Ser <contact@emersion.fr>
* build: use get_variable(pkgconfig) instead of get_pkgconfig_variable()Simon Ser2022-03-251-1/+1
| | | | | | | We don't get a warning for it yet, but get_pkgconfig_variable() is deprecated. Signed-off-by: Simon Ser <contact@emersion.fr>
* meson: override dependencies to ease use as subprojectSimon Ser2021-12-081-0/+8
| | | | | | | | | | | | | Make it easier to use Wayland as a Meson subproject by overriding dependencies we define. This allows to easily build Wayland as a subproject like so: subproject('wayland', required: false, default_options: ['documentation=false']) After this statement, the wayland-* dependencies will use the subproject instead of the system if available. Signed-off-by: Simon Ser <contact@emersion.fr>
* build: Include the Wayland minor version in libraries' ABI versionsSimon McVittie2021-10-281-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ABI of a shared library on Linux is given by a major version, which is part of the SONAME and is incremented (rarely) on incompatible changes, and a minor version, which is part of the basename of the regular file to which the SONAME provides a symlink. Until now, the ABI minor version was hard-coded, which means we can't tell which of a pair of Wayland libraries is newer (and therefore likely to have more symbols and/or fewer bugs). libwayland-egl already had ABI major version 1, so we can use the "marketing" version number as the ABI major.minor version number directly, so Wayland 1.19.90 would produce libwayland-egl.so.1 -> libwayland-egl.so.1.19.90. libwayland-cursor and libwayland-server have ABI major version 0, and OS distributions don't like it when there's a SONAME bump for no good reason, so use their existing ABI major version together with the "marketing" minor version: libwayland-cursor.so.0 -> libwayland-cursor.so.0.19.90. If the Wayland major version number is incremented to 2, we'll have to rethink this, so add some error() to break the build if/when that happens. Assuming that Wayland 2.0 would involve breaking changes, the best way would probably to bump all the SONAMEs to libwayland-foo.so.2. Resolves: https://gitlab.freedesktop.org/wayland/wayland/-/issues/175 Signed-off-by: Simon McVittie <smcv@collabora.com>
* Use epoll-shim to emulate epoll(7) on FreeBSDAlex Richardson2021-09-101-2/+4
| | | | | | | | FreeBSD does not provide epoll(7) and instead requires an external library, epoll-shim, that implements epoll() using kqueue(2) Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
* build: replace assembly embedding with Python scriptSimon Ser2021-05-101-4/+8
| | | | | | | | This allows Meson to properly track dependencies and re-build the scanner when editing the dtd. We also stop depending on GNU as' .incbin and make the embedding less obscure. Signed-off-by: Simon Ser <contact@emersion.fr>
* meson: Only require expat when building wayland-scannerMichael Weiss2021-04-021-1/+9
| | | | | | | | This code is only required for building wayland-scanner so it should be scoped accordingly. libxml-2.0 will only be required if both "scanner" and "dtd_validation" are set to true. Signed-off-by: Michael Weiss <dev.primeos@gmail.com>
* meson: link with -lrt if needed for clock_gettimeLoïc Yhuel2020-12-231-2/+3
| | | | | | This is already done in autotools, and fixes the build with glibc < 2.17. Signed-off-by: Loïc Yhuel <loic.yhuel@softathome.com>
* meson: Deduplicate generation of wayland-version.hMatt Turner2020-03-181-17/+8
| | | | Signed-off-by: Matt Turner <mattst88@gmail.com>
* meson: Add option to control building wayland-scannerMatt Turner2020-03-131-35/+50
| | | | | | | | | | | | | | | | | | | | | | | Wayland requires a binary, wayland-scanner, to be run during the build process. For any configuration other than native builds (including cross compiling and even 32-bit x86 builds on an x86-64 build machine) Wayland's build process builds and uses its own wayland-scanner. For any builds using a cross file, wayland-scanner is built for the host machine and therefore cannot be executed during the build of the Wayland libraries. Instead builds using a cross file must execute the build machine's wayland-scanner (typically /usr/bin/wayland-scanner). As such, to build Wayland's libraries for a non-native ABI a package manager must build and install /usr/bin/wayland-scanner first. But then the build for the native ABI then rebuilds wayland-scanner itself and doesn't use the system's, and worse, wants to install its own, which conflicts with the /usr/bin/wayland-scanner already installed! So, add the -Dscanner=... option to control whether to install wayland-scanner. Signed-off-by: Matt Turner <mattst88@gmail.com>
* meson: Require wayland-scanner of a matching versionMatt Turner2020-03-091-1/+1
| | | | | | | | | | | We have always built libwayland with the scanner from the same build so that the generated code and installed headers are exactly up-to-date with the libwayland version. If libwayland was to use a scanner later than itself, the scanner might do things that are not available in the libwayland at hand, leading to a broken build or a broken library (headers). Signed-off-by: Matt Turner <mattst88@gmail.com>
* build: check wayland-scanner versionSimon Ser2020-01-161-1/+1
| | | | | | We need the --strict flag, released in wayland 1.14.0. Signed-off-by: Simon Ser <contact@emersion.fr>
* meson: use strict wayland-scanner modeSimon Ser2020-01-151-2/+2
| | | | | | | Otherwise an invalid protocol will print warnings to stdout but won't make the build fail. Signed-off-by: Simon Ser <contact@emersion.fr>
* Revert "build: check wayland-scanner version"Simon Ser2020-01-131-1/+1
| | | | | | This reverts commit c2ce50b9d7bd470c2fe8faa4b0d996fca0fcbbaa. Pushed by mistake. Sorry about that.
* build: check wayland-scanner versionSimon Ser2020-01-131-1/+1
| | | | | | We need the --strict flag, released in wayland 1.14.0. Signed-off-by: Simon Ser <contact@emersion.fr>
* Add Meson buildEmmanuele Bassi2020-01-101-0/+228
Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>