From 82a5ff91afc397d08ef3dcfcb4df7eff2d3bf9f1 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sat, 18 Jul 2026 14:28:04 +0545 Subject: [PATCH] fix(app-capture): make gobject-introspection optional in meson build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI Arch container doesn't have g-i installed. The GIR/typelib is only needed for Python bindings — shared library builds fine without it. Both gir dependency and g-ir-compiler are now required: false. --- src/window/switcher/app-capture/meson.build | 33 +++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/window/switcher/app-capture/meson.build b/src/window/switcher/app-capture/meson.build index 7702535..e5b0329 100644 --- a/src/window/switcher/app-capture/meson.build +++ b/src/window/switcher/app-capture/meson.build @@ -8,7 +8,7 @@ wayland_client = dependency('wayland-client') wayland_scanner_dep = dependency('wayland-scanner', native: true) gobject = dependency('gobject-2.0') gtk3 = dependency('gtk+-3.0') -gir = dependency('gobject-introspection-1.0', required: true) +gir = dependency('gobject-introspection-1.0', required: false) cairo_dep = dependency('cairo') wayland_scanner = find_program('wayland-scanner') @@ -94,19 +94,22 @@ lib = shared_library('appcapture', install: true, ) -# GObject Introspection -gir_file = files('AppCapture-1.0.gir') +# GObject Introspection (optional — skipped if g-i not installed) +if gir.found() + gir_file = files('AppCapture-1.0.gir') -install_data(gir_file, - install_dir: get_option('datadir') / 'gir-1.0', -) + install_data(gir_file, + install_dir: get_option('datadir') / 'gir-1.0', + ) -gir_compiler = find_program('g-ir-compiler') - -custom_target('appcapture-typelib', - input: gir_file, - output: 'AppCapture-1.0.typelib', - command: [gir_compiler, '--output=@OUTPUT@', '@INPUT@'], - install: true, - install_dir: get_option('libdir') / 'girepository-1.0', -) + gir_compiler = find_program('g-ir-compiler', required: false) + if gir_compiler.found() + custom_target('appcapture-typelib', + input: gir_file, + output: 'AppCapture-1.0.typelib', + command: [gir_compiler, '--output=@OUTPUT@', '@INPUT@'], + install: true, + install_dir: get_option('libdir') / 'girepository-1.0', + ) + endif +endif