diff options
author | kotontrion <[email protected]> | 2024-09-24 10:47:14 +0200 |
---|---|---|
committer | kotontrion <[email protected]> | 2024-09-24 10:47:14 +0200 |
commit | 122112c320e62e52b3f0acc5d03c445c44bd8c4c (patch) | |
tree | 5fd80f779b938e767595f5ad37ecf87e7799a717 /core/src/meson.build | |
parent | ba7d92df104f374a3796c0c95f3a9cda04976f6a (diff) |
core: add window inhibit property
Diffstat (limited to 'core/src/meson.build')
-rw-r--r-- | core/src/meson.build | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/core/src/meson.build b/core/src/meson.build index d7d3871..11839f1 100644 --- a/core/src/meson.build +++ b/core/src/meson.build @@ -22,10 +22,41 @@ pkgconfig_deps = [ dependency('gtk+-3.0'), dependency('gdk-pixbuf-2.0'), dependency('gtk-layer-shell-0'), + dependency('wayland-client'), ] deps = pkgconfig_deps + meson.get_compiler('c').find_library('m') + +wayland_protos = dependency('wayland-protocols') +wayland_scanner = find_program('wayland-scanner') + +wl_protocol_dir = wayland_protos.get_variable(pkgconfig: 'pkgdatadir') + +gen_client_header = generator( + wayland_scanner, + output: ['@[email protected]'], + arguments: ['-c', 'client-header', '@INPUT@', '@BUILD_DIR@/@[email protected]'], +) + +gen_private_code = generator( + wayland_scanner, + output: ['@[email protected]'], + arguments: ['-c', 'private-code', '@INPUT@', '@BUILD_DIR@/@[email protected]'], +) + +protocols = [ + join_paths(wl_protocol_dir, 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml') +] + +client_protocol_srcs = [] + +foreach protocol : protocols + client_header = gen_client_header.process(protocol) + code = gen_private_code.process(protocol) + client_protocol_srcs += [client_header, code] +endforeach + sources = [ config, 'widget/box.vala', @@ -47,13 +78,16 @@ sources = [ 'process.vala', 'time.vala', 'variable.vala', -] + 'idle-inhibit.h', + 'idle-inhibit.c', +] + client_protocol_srcs if get_option('lib') lib = library( meson.project_name(), sources, dependencies: deps, + vala_args: ['--pkg', 'AstalInhibitManager'], vala_header: meson.project_name() + '.h', vala_vapi: meson.project_name() + '-' + api_version + '.vapi', vala_gir: gir, @@ -92,6 +126,7 @@ if get_option('cli') executable( meson.project_name(), ['cli.vala', sources], + vala_args: ['--pkg', 'AstalInhibitManager'], dependencies: deps, install: true, ) |