[gsettings-desktop-schemas/wip/carlosg/meson] build: Use intermediate noinst library to generate gir



commit e23419cf61a75d37a0b99ecf3545a5aeb655f2f4
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Nov 16 13:59:49 2018 +0100

    build: Use intermediate noinst library to generate gir
    
    There's the peculiarity that we only want to generate the GIR for a header
    file. The meson gnome module really wants an exec or a library. Since this
    is a one off case, generate an intermediate noinst library so we keep meson
    happy.
    
    Still use the --header-only extra g-ir-scanner argument, so the GIR does
    not ultimately depend on the library.

 headers/meson.build | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/headers/meson.build b/headers/meson.build
index 4bd3b15..ff364db 100644
--- a/headers/meson.build
+++ b/headers/meson.build
@@ -5,8 +5,12 @@ headers = files(
 install_headers(headers, subdir: gsettings_desktop_schemas_name)
 
 if not meson.is_cross_build() and get_option('introspection')
-  gnome.generate_gir(
-    header: headers,
+  noinst_lib = library ('noinst',
+                        headers,
+                        install: false)
+
+  gnome.generate_gir(noinst_lib,
+    sources: headers,
     namespace: 'GDesktopEnums',
     identifier_prefix: 'GDesktop',
     nsversion : '3.0',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]