Commit graph

18 commits

Author SHA1 Message Date
Simon Ser
c997223583 build: install headers with enums
Generate and install headers containing enums. See [1].

Meson requires us to generate headers in a "include/wayland-protocols"
directory, so that include paths can be properly set up when used
as a sub-project.

[1]: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/312

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-10-05 15:30:01 +00:00
PolyMeilex
9bfb27f0a4
Fix some trivial typos
Fix typos in protocol files and in python code

Signed-off-by: Bartłomiej Maryńczak <marynczakbartlomiej@gmail.com>
2024-05-03 14:16:40 +02:00
Simon Ser
60c6b51097 build: add Wayland subproject
This allows developers to work on a new wayland-scanner feature and
test it with wayland-protocols without too much hassle.

Depends on https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/313

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-05-19 23:34:18 +00:00
Simon Ser
7350cbefd8 build: stop using deprecated Meson functions
Fixes the following warning:

    NOTICE: Future-deprecated features used:
     * 0.55.0: {'ExternalProgram.path'}
     * 0.56.0: {'dependency.get_pkgconfig_variable'}

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-06-04 09:57:21 +02:00
Tadeo Kondrak
6a7c97988e build: Bump wayland-scanner version to 1.20.0
Wayland 1.20.0 adds support for the type attribute to mark events as
destructors.

Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2022-02-25 14:30:39 -07:00
Alex Richardson
82c89e8fe7 tests: check whether -Wl,--unresolved-symbols=ignore-all is supported
When linking for macOS, this linker flag is rejected. Instead of
always passing it, we can check whether it is supported first.

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-10-11 11:13:31 +01:00
Alex Richardson
78f654ed95 tests: allow cross-compiling the tests
I am trying to cross-compile from macOS for FreeBSD and this is currently
failing since the tests attempt to build a native binary that links
against the wayland-client and wayland-server libraries for the FreeBSD
system. I believe we should be building them for the target system and
not the current host (especially since there is no way to build
wayland-client and wayland-server for macOS, but I do want to check that
the files build correctly for FreeBSD).

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-10-04 10:24:23 +01:00
Fabrice Fontaine
80e97bd00b meson.build: wayland-scanner is only needed for tests
wayland-scanner is only needed for tests so don't require it if tests
are disabled

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-09-19 11:31:59 +02:00
Simon Ser
e9a88a2e6c build: only require C/C++ compilers for host
We use the no-op executables in test() directives, so these will be
run on the host. This fixes the following warning:

    tests/meson.build:23: WARNING: add_languages is missing native:, assuming
    languages are wanted for both host and build.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-09-01 09:26:17 +02:00
Simon Ser
9bc93d3ad2 build: fix indentation in tests/meson.build
The rest of the file uses tabs, not spaces.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-09-01 07:15:50 +00:00
Daniel Stone
62e862fac4 tests: Include libwayland cflags/ldflags
When we're building C++ test executables, make sure we pull in the
correct libwayland headers, to avoid trying to compile against a version
different from the scanner we built it against.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-28 20:54:26 +01:00
Xavier Claessens
cb38399d36 tests: Fix build with -Wextra
Unused arguments warnings are treated as errors in those tests
otherwise.

Fixes: #53.

Signed-off-by: Xavier Claessens <xavier.claessens@collabora.com>
2021-06-23 14:30:50 -04:00
Issam E. Maghni
9eb8819bb1 tests: use dynamic python path
Stop hardcoding the Python path to /usr/bin/python3. Not all systems
have Python installed to /usr/bin, and some users might have installed
Python to a custom location.

Instead, use /usr/bin/env, which performs a $PATH lookup to find the
Python executable.

Signed-off-by: Issam E. Maghni <issam.e.maghni@mailbox.org>
2021-06-03 13:25:00 -04:00
Jonas Ådahl
5cb6b92f01 tests: Add compile tests
Only tested by the meson build system.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-03-26 15:50:36 +01:00
Jonas Ådahl
79b9a42514 Add meson build system support
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-03-26 15:50:36 +01:00
Jonas Ådahl
6d58be0035 tests: Make wayland-scanner strict
Pass --strict to wayland-scanner in order to make it exit with failure
if something wasn't correct.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2018-07-30 17:27:53 +02:00
Jonas Ådahl
3bd79c2ddc tests: Use public-code and private-code instead of code
The wayland-scanner sub-commands private-code and public-code replaced
the old code command, so lets use those in the tests instead.

This requires at least wayland-scanner 1.15.0.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2018-07-30 17:27:53 +02:00
Derek Foreman
d8cb9c2a8b test: add make check
We can now test all the protocol files by running make check (or distcheck)
which will pass them through the scanner.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
2016-01-14 15:49:00 +08:00