[nautilus] build: Allow disabling GIR data generation



commit 200a5869b5c1dc8c8f04247e5be3689d9275fd72
Author: Ernestas Kulik <ernestask gnome org>
Date:   Mon Jul 23 19:16:43 2018 +0300

    build: Allow disabling GIR data generation

 libnautilus-extension/meson.build | 34 ++++++++--------
 meson_options.txt                 | 81 +++++++++++++++++++++++++++++++++++----
 2 files changed, 92 insertions(+), 23 deletions(-)
---
diff --git a/libnautilus-extension/meson.build b/libnautilus-extension/meson.build
index d62b05c62..c01899498 100644
--- a/libnautilus-extension/meson.build
+++ b/libnautilus-extension/meson.build
@@ -73,22 +73,24 @@ libnautilus_extension = shared_library(
   install: true
 )
 
-gnome.generate_gir(
-  libnautilus_extension,
-  extra_args: [
-    '-DNAUTILUS_COMPILATION'
-  ],
-  sources: libnautilus_extension_sources,
-  nsversion: '3.0',
-  namespace: 'Nautilus',
-  includes: [
-    'Gtk-3.0',
-    'Gio-2.0',
-    'GLib-2.0'
-  ],
-  header: 'nautilus-extension.h',
-  install: true
-)
+if get_option('introspection')
+  gnome.generate_gir(
+    libnautilus_extension,
+    extra_args: [
+      '-DNAUTILUS_COMPILATION'
+    ],
+    sources: libnautilus_extension_sources,
+    nsversion: '3.0',
+    namespace: 'Nautilus',
+    includes: [
+      'Gtk-3.0',
+      'Gio-2.0',
+      'GLib-2.0'
+    ],
+    header: 'nautilus-extension.h',
+    install: true
+  )
+endif
 
 nautilus_extension = declare_dependency(
   sources: libnautilus_extension_enums[1],
diff --git a/meson_options.txt b/meson_options.txt
index 072b4549c..fce5f16f9 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,7 +1,74 @@
-option('docs', type: 'boolean', value: false)
-option('profiling', type: 'boolean', value: false)
-option('extensions', type: 'boolean', value: true)
-option('packagekit', type: 'boolean', value: true)
-option('selinux', type: 'boolean', value: false)
-option('tests', type: 'combo', choices: ['none', 'headless', 'all'], value: 'headless')
-option('profile', type : 'string', value : '', description : 'Profile to be used as app id')
\ No newline at end of file
+##############
+# Extensions #
+##############
+option(
+  'docs',
+  type: 'boolean',
+  value: false,
+  description: 'Build documentation for extension library',
+)
+option(
+  'extensions',
+  type: 'boolean',
+  value: true,
+  description: 'Build stock extensions',
+)
+option(
+  'introspection',
+  type: 'boolean',
+  value: true,
+  description: 'Build GObject introspection data for extension library',
+)
+##################
+# End extensions #
+##################
+
+############
+# Features #
+############
+option(
+  'packagekit',
+  type: 'boolean',
+  value: true,
+  description: 'Enable finding file type handlers using PackageKit',
+)
+option(
+  'selinux',
+  type: 'boolean',
+  value: false,
+  description: 'Enable SELinux context support in file properties dialog',
+)
+################
+# End features #
+################
+
+###########
+# Testing #
+###########
+option(
+  'profiling',
+  type: 'boolean',
+  value: false,
+  description: 'Enable performance profiling',
+)
+option(
+  'tests',
+  type: 'combo',
+  choices: [
+    'none',
+    'headless',
+    'all'
+  ],
+  value: 'headless',
+  description: 'Build selected tests',
+)
+###############
+# End testing #
+###############
+
+option(
+  'profile',
+  type: 'string',
+  value: '',
+  description: 'Build with specified application ID',
+)


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