[librest] meson: show vapi option in summary



commit 6077c5b7c3522f18e294419ce1da0aadbefd004a
Author: Günther Wagner <info gunibert de>
Date:   Thu Jan 13 18:09:03 2022 +0100

    meson: show vapi option in summary
    
    Also protect against misconfiguration of introspection and vapi as
    introspection is needed for vapi generation

 meson.build             | 1 +
 rest-extras/meson.build | 4 ++++
 rest/meson.build        | 4 ++++
 3 files changed, 9 insertions(+)
---
diff --git a/meson.build b/meson.build
index 4fd3195..2c6d4ba 100644
--- a/meson.build
+++ b/meson.build
@@ -116,6 +116,7 @@ summary({
 
 summary({
     'Introspection': get_option('introspection'),
+    'Vapi': get_option('vapi'),
     'Documentation': get_option('gtk_doc'),
     'Tests': get_option('tests'),
     'Soup 2': get_option('soup2'),
diff --git a/rest-extras/meson.build b/rest-extras/meson.build
index 159676b..67e6fd0 100644
--- a/rest-extras/meson.build
+++ b/rest-extras/meson.build
@@ -45,6 +45,10 @@ librest_extras_dep = declare_dependency(
   link_with: librest_extras_lib,
 )
 
+if get_option('vapi') and not get_option('introspection')
+  warning('Vapi generation needs "introspection" option in order to generate the .vapi file')
+endif
+
 if get_option('introspection')
   librest_extras_gir = gnome.generate_gir(librest_extras_lib,
     sources: librest_extras_sources + librest_extras_headers,
diff --git a/rest/meson.build b/rest/meson.build
index 868c239..9f6ed05 100644
--- a/rest/meson.build
+++ b/rest/meson.build
@@ -76,6 +76,10 @@ install_headers(librest_headers,
 rest_dep_sources = []
 
 # GObject Introspection
+if get_option('vapi') and not get_option('introspection')
+  warning('Vapi generation needs "introspection" option in order to generate the .vapi file')
+endif
+
 if get_option('introspection')
   librest_gir_extra_args = [
     '--accept-unprefixed',


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