diff options
author | Mark Bolhuis <mark@bolhuis.dev> | 2022-09-07 00:59:08 +0100 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2022-09-07 08:43:29 -0400 |
commit | b6235a2e42deb417f13cb9411e0c6feb2a4ab995 (patch) | |
tree | 886f7493d05b9aa4b3202e8f732d9d7cec15bdab | |
parent | 25f838fd3328273733976b16775142a58e3db275 (diff) | |
download | meson-b6235a2e42deb417f13cb9411e0c6feb2a4ab995.zip meson-b6235a2e42deb417f13cb9411e0c6feb2a4ab995.tar.gz meson-b6235a2e42deb417f13cb9411e0c6feb2a4ab995.tar.bz2 |
modules/wayland: Rename core_only to include_core_only
Rename the core_only option in scan_xml to include_core_only
to match the flag used by wayland-scanner.
-rw-r--r-- | docs/markdown/Wayland-module.md | 7 | ||||
-rw-r--r-- | mesonbuild/modules/wayland.py | 6 | ||||
-rw-r--r-- | test cases/wayland/2 core only/meson.build | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/docs/markdown/Wayland-module.md b/docs/markdown/Wayland-module.md index 353bb6b..ce2b7a6 100644 --- a/docs/markdown/Wayland-module.md +++ b/docs/markdown/Wayland-module.md @@ -50,7 +50,7 @@ generated = wl_mod.scan_xml( client : true, server : true, public : false, - core_only : false, + include_core_only : false, ) ``` This function accepts one or more arguments of either string or file type. @@ -62,8 +62,9 @@ It takes the following keyword arguments: generated. The default is true. - `server` Optional arg that specifies if server side header file is generated. The default is false. -- `core_only` Optional arg that specifies that generated headers only include - wayland-client-core.h instead of wayland-client.h. Since *0.64.0* +- `include_core_only` Optional arg that specifies that generated headers only include + `wayland-<client|server>-core.h` instead of `wayland-<client|server>.h`. + The default is true. Since *0.64.0* **Returns**: a list of [[@custom_tgt]] in the order source, client side header, server side header. Generated header files have the name diff --git a/mesonbuild/modules/wayland.py b/mesonbuild/modules/wayland.py index 1b2b333..0cbc4b7 100644 --- a/mesonbuild/modules/wayland.py +++ b/mesonbuild/modules/wayland.py @@ -37,7 +37,7 @@ if T.TYPE_CHECKING: public: bool client: bool server: bool - core_only: bool + include_core_only: bool class FindProtocol(TypedDict): @@ -66,7 +66,7 @@ class WaylandModule(ExtensionModule): KwargInfo('public', bool, default=False), KwargInfo('client', bool, default=True), KwargInfo('server', bool, default=False), - KwargInfo('core_only', bool, default=False, since='0.64.0'), + KwargInfo('include_core_only', bool, default=False, since='0.64.0'), ) def scan_xml(self, state: ModuleState, args: T.Tuple[T.List[FileOrString]], kwargs: ScanXML) -> ModuleReturnValue: if self.scanner_bin is None: @@ -101,7 +101,7 @@ class WaylandModule(ExtensionModule): for side in sides: command = [self.scanner_bin, f'{side}-header', '@INPUT@', '@OUTPUT@'] - if kwargs['core_only']: + if kwargs['include_core_only']: command.append('--include-core-only') header = CustomTarget( diff --git a/test cases/wayland/2 core only/meson.build b/test cases/wayland/2 core only/meson.build index bb98992..a35e981 100644 --- a/test cases/wayland/2 core only/meson.build +++ b/test cases/wayland/2 core only/meson.build @@ -9,6 +9,6 @@ wl_mod = import('unstable-wayland') wl_client_dep = dependency('wayland-client') xdg_shell_xml = wl_mod.find_protocol('xdg-shell') -xdg_shell = wl_mod.scan_xml(xdg_shell_xml, core_only : true) +xdg_shell = wl_mod.scan_xml(xdg_shell_xml, include_core_only : true) exe = executable('core', 'core.c', xdg_shell, dependencies : wl_client_dep) test('core', exe) |