meson: make fractional scale optional.

This commit is contained in:
yangyingchao 2023-07-19 07:31:23 +08:00
parent fdd753263b
commit 62cc368047
3 changed files with 11 additions and 5 deletions

View file

@ -155,6 +155,7 @@ Available compile-time options:
| `-Dsystemd-units-dir` | string | `${systemduserunitdir}` | Where to install the systemd service files (absolute) | None |
| `-Dutmp-backend` | combo | `auto` | Which utmp backend to use (`none`, `libutempter`, `ulog` or `auto`) | libutempter or ulog |
| `-Dutmp-default-helper-path` | string | `auto` | Default path to utmp helper binary. `auto` selects path based on `utmp-backend` | None |
| `-Dfractional-scale` | bool | `true` | Enable fractional scale support (available after >=wayland-protocol-1.31) | None |
Documentation includes the man pages, readme, changelog and license
files.

View file

@ -161,14 +161,16 @@ if wayland_protocols.version().version_compare('>=1.21')
else
xdg_activation = false
endif
if wayland_protocols.version().version_compare('>=1.31')
add_project_arguments('-DHAVE_FRACTIONAL_SCALE', language: 'c')
wl_proto_xml += [wayland_protocols_datadir + '/stable/viewporter/viewporter.xml']
wl_proto_xml += [wayland_protocols_datadir + '/staging/fractional-scale/fractional-scale-v1.xml']
fractional_scale = true
if get_option('fractional-scale') and wayland_protocols.version().version_compare('>=1.31')
add_project_arguments('-DHAVE_FRACTIONAL_SCALE', language: 'c')
wl_proto_xml += [wayland_protocols_datadir + '/stable/viewporter/viewporter.xml']
wl_proto_xml += [wayland_protocols_datadir + '/staging/fractional-scale/fractional-scale-v1.xml']
fractional_scale = false
else
fractional_scale = false
endif
if wayland_protocols.version().version_compare('>=1.32')
wl_proto_xml += [
wayland_protocols_datadir + '/unstable/tablet/tablet-unstable-v2.xml', # required by cursor-shape-v1

View file

@ -26,3 +26,6 @@ option('utmp-backend', type: 'combo', value: 'auto', choices: ['none', 'libutemp
description: 'Which utmp logging backend to use. This affects how (with what arguments) the utmp helper binary (see \'utmp-default-helper-path\')is called. Default: auto (linux=libutempter, freebsd=ulog, others=none)')
option('utmp-default-helper-path', type: 'string', value: 'auto',
description: 'Default path to the utmp helper binary. Default: auto-detect')
option('fractional-scale', type: 'boolean', value: true,
description: 'Enables fractional scale support (available after wayland-protocol-1.31)')