[rygel/wip/meson: 85/85] meson: Add uninstalled option



commit aeca07204036ff4fa3846653683e6387c33a3389
Author: Jens Georg <mail jensge org>
Date:   Sun Sep 9 15:07:28 2018 +0200

    meson: Add uninstalled option

 meson.build       | 27 +++++++++++++++++++++------
 meson_options.txt |  1 +
 2 files changed, 22 insertions(+), 6 deletions(-)
---
diff --git a/meson.build b/meson.build
index 93ad17cd..153fd25c 100644
--- a/meson.build
+++ b/meson.build
@@ -1,23 +1,38 @@
 project('rygel', ['vala', 'c'],
-        version : '0.35.0')
+        version : '0.36.2')
 
 i18n = import('i18n')
 
-rygel_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
-rygel_datadir = join_paths(get_option('prefix'), get_option('datadir'))
 rygel_libdir = join_paths(get_option('prefix'), get_option('libdir'))
-rygel_plugindir = join_paths(rygel_libdir, 'rygel-2.6', 'plugins')
-rygel_enginedir = join_paths(rygel_libdir, 'rygel-2.6', 'engines')
+rygel_includedir = join_paths(get_option('includedir'), 'rygel-2.6')
+rygel_vapidir = join_paths(get_option('prefix'), get_option('datadir'), 'vala/vapi')
+rygel_systemduserdir = join_paths(get_option('prefix'), 'lib', 'systemd', 'user')
+if not get_option('uninstalled')
+rygel_datadir = join_paths(get_option('prefix'), get_option('datadir'))
 rygel_libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'),
     'rygel')
+rygel_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
+rygel_plugindir = join_paths(rygel_libdir, 'rygel-2.6', 'plugins')
+rygel_enginedir = join_paths(rygel_libdir, 'rygel-2.6', 'engines')
 rygel_presetdir = join_paths(rygel_datadir, 'rygel', 'presets')
 rygel_icondir = join_paths(rygel_datadir, 'icons', 'hicolor')
 rygel_bigicondir = join_paths(rygel_datadir, 'rygel', 'icons', '120x120')
 rygel_smallicondir = join_paths(rygel_datadir, 'rygel', 'icons', '48x48')
 rygel_includedir = join_paths(get_option('includedir'), 'rygel-2.6')
 rygel_vapidir = join_paths(rygel_datadir, 'vala', 'vapi')
-
 rygel_systemduserdir = join_paths(get_option('prefix'), 'lib', 'systemd', 'user')
+else
+rygel_datadir = join_paths(meson.current_build_dir(), 'data')
+rygel_libexecdir = join_paths(meson.current_build_dir(), 'src/plugins/media-export')
+rygel_sysconfdir = join_paths(meson.current_source_dir(), 'data')
+rygel_plugindir = join_paths(meson.current_build_dir(), 'src', 'plugins')
+rygel_enginedir = join_paths(meson.current_build_dir(), 'src', 'media-engines')
+rygel_presetdir = join_paths(meson.current_source_dir(), 'data', 'presets')
+rygel_icondir = join_paths(meson.current_source_dir(), 'data', 'icons', 'hicolor')
+rygel_bigicondir = join_paths(meson.current_source_dir(), 'data', 'icons', '120x120')
+rygel_smallicondir = join_paths(meson.current_source_dir(), 'data', 'icons', '48x48')
+endif
+
 plugin_config = configuration_data()
 plugin_config.set('VERSION', meson.project_version())
 
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..2f534811
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1 @@
+option('uninstalled', type: 'boolean', value: 'false', description: 'Run Rygel from build directory only')


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