[geary/mjog/meson-cleanup: 4/8] Consistently use '_dir' suffix for meson directory variables
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/meson-cleanup: 4/8] Consistently use '_dir' suffix for meson directory variables
- Date: Fri, 27 Sep 2019 14:32:27 +0000 (UTC)
commit f5f9350d2f0f14f3dc02405a7913cb1700c2f6b1
Author: Michael Gratton <mike vee net>
Date: Fri Sep 27 23:55:32 2019 +1000
Consistently use '_dir' suffix for meson directory variables
desktop/meson.build | 14 +++++++-------
icons/meson.build | 7 +++----
meson.build | 22 ++++++++++++++--------
sql/meson.build | 2 +-
4 files changed, 25 insertions(+), 20 deletions(-)
---
diff --git a/desktop/meson.build b/desktop/meson.build
index 79698674..f0c8a660 100644
--- a/desktop/meson.build
+++ b/desktop/meson.build
@@ -16,7 +16,7 @@ desktop_file = i18n.merge_file(
type: 'desktop',
po_dir: po_dir,
install: true,
- install_dir: join_paths(datadir, 'applications')
+ install_dir: join_paths(data_dir, 'applications')
)
desktop_output += desktop_file
@@ -30,7 +30,7 @@ autostart_file = i18n.merge_file(
type: 'desktop',
po_dir: po_dir,
install: true,
- install_dir: join_paths(datadir, 'applications')
+ install_dir: join_paths(data_dir, 'applications')
)
desktop_output += autostart_file
@@ -60,7 +60,7 @@ appdata_merged = i18n.merge_file(
type: 'xml',
po_dir: po_dir,
install: true,
- install_dir: join_paths(datadir, 'metainfo')
+ install_dir: join_paths(data_dir, 'metainfo')
)
if appstream_util.found()
@@ -87,11 +87,11 @@ if install_contractor_file
output: 'geary-attach.contract',
command: [msgfmt, '--desktop', '--keyword=Description', '--template', '@INPUT@', '-d', po_dir, '-o',
'@OUTPUT@'],
install: true,
- install_dir: join_paths(datadir, 'contractor')
+ install_dir: join_paths(data_dir, 'contractor')
)
install_data('geary-attach',
- install_dir: bindir,
+ install_dir: bin_dir,
)
endif
@@ -108,7 +108,7 @@ geary_compiled_schema = gnome.compile_schemas(
depend_files: files('org.gnome.Geary.gschema.xml'),
)
install_data('org.gnome.Geary.gschema.xml',
- install_dir: join_paths(datadir, 'glib-2.0', 'schemas'),
+ install_dir: join_paths(data_dir, 'glib-2.0', 'schemas'),
)
#
@@ -116,7 +116,7 @@ install_data('org.gnome.Geary.gschema.xml',
#
service_conf = configuration_data()
-service_conf.set('bindir', bindir)
+service_conf.set('bindir', bin_dir)
service_conf.set('appid', geary_id)
configure_file(
diff --git a/icons/meson.build b/icons/meson.build
index eb581369..2234d3b0 100644
--- a/icons/meson.build
+++ b/icons/meson.build
@@ -1,4 +1,4 @@
-system_icons_dir = join_paths(datadir, 'icons', 'hicolor')
+system_icons_dir = join_paths(data_dir, 'icons', 'hicolor')
icon_files = files(
'mail-archive-symbolic.svg',
@@ -45,7 +45,7 @@ scalable_dir = join_paths('hicolor', 'scalable', 'apps')
install_data(
join_paths(scalable_dir, 'org.gnome.Geary.svg'),
- install_dir: join_paths(datadir, 'icons', scalable_dir),
+ install_dir: join_paths(data_dir, 'icons', scalable_dir),
rename: '@0@.svg'.format(geary_id)
)
@@ -53,7 +53,6 @@ symbolic_dir = join_paths('hicolor', 'symbolic', 'apps')
install_data(
join_paths(symbolic_dir, 'org.gnome.Geary-symbolic.svg'),
- install_dir: join_paths(datadir, 'icons', symbolic_dir),
+ install_dir: join_paths(data_dir, 'icons', symbolic_dir),
rename: '@0 -symbolic svg'.format(geary_id)
)
-
diff --git a/meson.build b/meson.build
index 70ccc494..4eaf707d 100644
--- a/meson.build
+++ b/meson.build
@@ -37,16 +37,22 @@ cc = meson.get_compiler('c')
valac = meson.get_compiler('vala')
config_h_dir = include_directories('.')
geary_prefix = get_option('prefix')
-bindir = join_paths(geary_prefix, get_option('bindir'))
-datadir = join_paths(geary_prefix, get_option('datadir'))
-libdir = join_paths(geary_prefix, get_option('libdir'))
-locale_dir = join_paths(geary_prefix, get_option('localedir'))
+
+# Source dirs
+metadata_dir = join_paths(meson.source_root(), 'bindings', 'metadata')
po_dir = join_paths(meson.source_root(), 'po')
vapi_dir = join_paths(meson.source_root(), 'bindings', 'vapi')
-metadata_dir = join_paths(meson.source_root(), 'bindings', 'metadata')
-dbus_services_dir = join_paths(datadir, 'dbus-1', 'services')
-web_extensions_dir = join_paths(libdir, 'geary', 'web-extensions')
-plugins_dir = join_paths(libdir, 'geary', 'plugins')
+
+# Configurable install dirs
+bin_dir = join_paths(geary_prefix, get_option('bindir'))
+data_dir = join_paths(geary_prefix, get_option('datadir'))
+lib_dir = join_paths(geary_prefix, get_option('libdir'))
+locale_dir = join_paths(geary_prefix, get_option('localedir'))
+
+# Static install dirs
+dbus_services_dir = join_paths(data_dir, 'dbus-1', 'services')
+plugins_dir = join_paths(lib_dir, 'geary', 'plugins')
+web_extensions_dir = join_paths(lib_dir, 'geary', 'web-extensions')
# Make sure Meson can find our custom VAPI's
add_project_arguments([
diff --git a/sql/meson.build b/sql/meson.build
index a8ec43e4..126f2982 100644
--- a/sql/meson.build
+++ b/sql/meson.build
@@ -27,5 +27,5 @@ sql_files = [
]
install_data(sql_files,
- install_dir: join_paths(datadir, meson.project_name(), 'sql')
+ install_dir: join_paths(data_dir, meson.project_name(), 'sql')
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]