fix(app-capture): make gobject-introspection optional in meson build

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.
This commit is contained in:
sankalp committed 2026-07-18 14:28:04 +05:45
1 parent 2a04a17ad7
commit 82a5ff91af
1 file changed
+18 -15
+18 -15
View File
@@ -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