summaryrefslogtreecommitdiff
blob: d565884994fdab7f5a462dcb24dba3769837749d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
From 6d61774b8556eb4acfa5e7613ee25893d2a7e565 Mon Sep 17 00:00:00 2001
From: Mart Raudsepp <leio@gentoo.org>
Date: Tue, 18 Aug 2020 09:36:19 +0300
Subject: [PATCH 2/2] build: Make vapi optional

---
 gck/meson.build   | 2 ++
 gcr/meson.build   | 2 ++
 meson_options.txt | 5 +++++
 ui/meson.build    | 2 ++
 4 files changed, 11 insertions(+)

diff --git a/gck/meson.build b/gck/meson.build
index 756b486..a15f4ed 100644
--- a/gck/meson.build
+++ b/gck/meson.build
@@ -142,6 +142,7 @@ if get_option('introspection')
     install: true,
   )
 
+if get_option('vapi')
   gck_vapi = gnome.generate_vapi('gck-@0@'.format(gck_major_version),
     sources: gck_gir[0],
     metadata_dirs: meson.current_source_dir(),
@@ -153,6 +154,7 @@ if get_option('introspection')
     install_dir: get_option('datadir') / 'vala' / 'vapi',
   )
 endif
+endif
 
 # pkg-config file
 pkgconfig.generate(gck_lib,
diff --git a/gcr/meson.build b/gcr/meson.build
index 06c3a63..cc642cf 100644
--- a/gcr/meson.build
+++ b/gcr/meson.build
@@ -204,6 +204,7 @@ if get_option('introspection')
     install: true,
   )
 
+if get_option('vapi')
   gcr_vapi = gnome.generate_vapi('gcr-@0@'.format(gcr_major_version),
     sources: gcr_gir[0],
     packages: [ 'glib-2.0', 'gio-2.0', gck_vapi ],
@@ -217,6 +218,7 @@ if get_option('introspection')
     install: true,
   )
 endif
+endif
 
 # pkg-config file
 pkgconfig.generate(gcr_base_lib,
diff --git a/meson_options.txt b/meson_options.txt
index ae0f524..f68cb95 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -18,3 +18,8 @@ option('gpg_path',
   value: '',
   description: 'Path to gpg, autodetected if not set',
 )
+option('vapi',
+  type: 'boolean',
+  value: true,
+  description: 'Generate vapi data (requires vapigen and introspection option)',
+)
diff --git a/ui/meson.build b/ui/meson.build
index 477412d..0b89b24 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -169,6 +169,7 @@ if get_option('introspection')
     install: true,
   )
 
+if get_option('vapi')
   gcr_ui_vapi = gnome.generate_vapi('gcr-ui-@0@'.format(gcr_major_version),
     sources: gcr_ui_gir[0],
     packages: [
@@ -190,6 +191,7 @@ if get_option('introspection')
     install: true,
   )
 endif
+endif
 
 # gcr-viewer
 gcr_viewer = executable('gcr-viewer',
-- 
2.26.2