[gnome-builder] build: allow specifying the path to ctags



commit c84d5802b7de88c7f10f149e00181e9637675219
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jun 26 01:20:04 2018 -0700

    build: allow specifying the path to ctags
    
    If you want to force a ctags binary to be used, we need to inject that
    into the default settings.

 data/gsettings/meson.build | 21 +++++++++++----------
 meson_options.txt          |  2 ++
 2 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/data/gsettings/meson.build b/data/gsettings/meson.build
index 093c8e062..b8b2c8028 100644
--- a/data/gsettings/meson.build
+++ b/data/gsettings/meson.build
@@ -1,16 +1,17 @@
 schema_dir = join_paths(get_option('datadir'), 'glib-2.0', 'schemas')
 
 # Perhaps this should be moved to the plugin
-ctags_path = 'ctags'
-ctags = find_program(
-  'ctags-exuberant',
-  'exctags',
-  'ectags',
-  'ctags',
-  required: false
-)
-if ctags.found()
-  ctags_path = ctags.path()
+ctags_path = get_option('ctags_path')
+if ctags_path == ''
+  ctags_path = 'ctags'
+  ctags = find_program('ctags-exuberant',
+                       'exctags',
+                       'ectags',
+                       'ctags',
+                       required: false)
+  if ctags.found()
+    ctags_path = ctags.path()
+  endif
 endif
 
 schema_conf = configuration_data()
diff --git a/meson_options.txt b/meson_options.txt
index ee18ae880..ea7b10ff3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -17,6 +17,8 @@ option('with_vapi', type: 'boolean')
 option('with_help', type: 'boolean')
 option('with_docs', type: 'boolean', value: false)
 
+option('ctags_path', type: 'string', value: '')
+
 # Plugins
 # Ideally we want many of these to be defined in the plugin dir:
 #   https://github.com/mesonbuild/meson/issues/707


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