diff options
author | Jonas Ã…dahl <jadahl@gmail.com> | 2023-02-01 17:49:08 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2023-02-13 15:34:24 +0000 |
commit | 3c65b8d9e061a2f828aa8c1502784f256a430875 (patch) | |
tree | a6442234156d3bf26fa147764c27ebff7ad8d977 /src | |
parent | 79e1fc63adbd3eac7788d8c8b034ec08f7e0dcce (diff) | |
download | mutter-3c65b8d9e061a2f828aa8c1502784f256a430875.tar.gz |
build: Store generated Wayland protocol files in table
This makes it possible for e.g. test cases to pick protocol extensions
to include.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2810>
Diffstat (limited to 'src')
-rw-r--r-- | src/meson.build | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/meson.build b/src/meson.build index cf3abd0d9..c908e48e8 100644 --- a/src/meson.build +++ b/src/meson.build @@ -992,6 +992,8 @@ wayland_protocol_server_headers = [] wayland_protocol_client_headers = [] wayland_protocol_sources = [] +wayland_protocol_files = {} + if have_wayland # Format: # - protocol name @@ -1063,7 +1065,7 @@ if have_wayland output_base)) endif - wayland_protocol_server_headers += custom_target('@0@ server header'.format(output_base), + server_header = custom_target('@0@ server header'.format(output_base), input: input, output: '@0@-server-protocol.h'.format(output_base), command: [ @@ -1072,9 +1074,7 @@ if have_wayland '@INPUT@', '@OUTPUT@', ] ) - - # used by tests - wayland_protocol_client_headers += custom_target('@0@ client header'.format(output_base), + client_header = custom_target('@0@ client header'.format(output_base), input: input, output: '@0@-client-protocol.h'.format(output_base), command: [ @@ -1083,8 +1083,7 @@ if have_wayland '@INPUT@', '@OUTPUT@', ] ) - - wayland_protocol_sources += custom_target('@0@ source'.format(output_base), + protocol_code = custom_target('@0@ source'.format(output_base), input: input, output: '@0@-protocol.c'.format(output_base), command: [ @@ -1093,6 +1092,18 @@ if have_wayland '@INPUT@', '@OUTPUT@', ] ) + + wayland_protocol_files += { + protocol_name: { + 'server-header': server_header, + 'client-header': client_header, + 'protocol-code': protocol_code, + }, + } + + wayland_protocol_server_headers += server_header + wayland_protocol_client_headers += client_header + wayland_protocol_sources += protocol_code endforeach endif |