[gnome-games] meson: Use / rather than join_paths()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] meson: Use / rather than join_paths()
- Date: Sat, 31 Oct 2020 16:50:47 +0000 (UTC)
commit 11f98c25d96a3b191f9d327336ec459b3696373e
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sat Oct 31 14:47:04 2020 +0100
meson: Use / rather than join_paths()
This makes the recipes simpler and more readable.
data/icons/meson.build | 14 +++++++-------
data/meson.build | 8 ++++----
meson.build | 22 +++++++++++-----------
src/meson.build | 4 ++--
4 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/data/icons/meson.build b/data/icons/meson.build
index eb3816c1..201a0b2a 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -1,14 +1,14 @@
-hicolor_dir = join_paths(datadir, 'icons', 'hicolor')
+hicolor_dir = datadir / 'icons' / 'hicolor'
-scalable_dir = join_paths('scalable', 'apps')
+scalable_dir = 'scalable' / 'apps'
install_data(
- join_paths(scalable_dir, '@0@.svg'.format(application_id)),
- install_dir: join_paths(hicolor_dir, scalable_dir)
+ scalable_dir / '@0@.svg'.format(application_id),
+ install_dir: hicolor_dir / scalable_dir
)
-symbolic_dir = join_paths('symbolic', 'apps')
+symbolic_dir = 'symbolic' / 'apps'
install_data(
- join_paths(symbolic_dir, 'org.gnome.Games-symbolic.svg'),
- install_dir: join_paths(hicolor_dir, symbolic_dir),
+ symbolic_dir / 'org.gnome.Games-symbolic.svg',
+ install_dir: hicolor_dir / symbolic_dir,
rename: '@0 -symbolic svg'.format(application_id)
)
diff --git a/data/meson.build b/data/meson.build
index 5e30cf27..8dfb2156 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -16,7 +16,7 @@ desktop_file = i18n.merge_file ('desktop-file',
output: '@0@.desktop'.format(application_id),
po_dir: podir,
install: true,
- install_dir: join_paths (datadir, 'applications')
+ install_dir: datadir / 'applications'
)
desktop_file_validate = find_program('desktop-file-validate', required: false)
@@ -41,7 +41,7 @@ appdata_file = i18n.merge_file ('appdata-file',
output: '@0 appdata xml'.format(application_id),
po_dir: podir,
install: true,
- install_dir: join_paths (datadir, 'metainfo')
+ install_dir: datadir / 'metainfo'
)
appstream_util = find_program('appstream-util', required: false)
@@ -72,7 +72,7 @@ configure_file (
output: 'org.gnome.Games.gschema.xml',
configuration: gsettings_conf,
install: true,
- install_dir: join_paths(datadir, 'glib-2.0', 'schemas'),
+ install_dir: datadir / 'glib-2.0' / 'schemas',
)
search_provider_conf = configuration_data()
@@ -81,7 +81,7 @@ search_provider_conf.set('profile', profile)
configure_file(
configuration: search_provider_conf,
input: 'org.gnome.Games.SearchProvider.ini.in',
- install_dir: join_paths(datadir, 'gnome-shell', 'search-providers'),
+ install_dir: datadir / 'gnome-shell' / 'search-providers',
install: true,
output: '@0 SearchProvider ini'.format(application_id)
)
diff --git a/meson.build b/meson.build
index a46681b9..acd9198b 100644
--- a/meson.build
+++ b/meson.build
@@ -48,18 +48,18 @@ sqlite_dep = dependency ('sqlite3')
tracker_sparql_dep = dependency ('tracker-sparql-2.0')
xml_dep = dependency ('libxml-2.0')
-srcdir = join_paths (meson.source_root (), 'src')
-podir = join_paths (meson.source_root (), 'po')
+srcdir = meson.source_root () / 'src'
+podir = meson.source_root () / 'po'
prefix = get_option('prefix')
-bindir = join_paths (prefix, get_option ('bindir'))
-datadir = join_paths (prefix, get_option ('datadir'))
-libdir = join_paths (prefix, get_option ('libdir'))
-libexecdir = join_paths (prefix, get_option ('libexecdir'))
-localedir = join_paths (prefix, get_option ('localedir'))
-servicedir = join_paths (datadir, 'dbus-1', 'services')
-options_dir = join_paths (datadir, meson.project_name(), 'options')
-plugins_dir = join_paths (libdir, meson.project_name(), 'plugins')
+bindir = prefix / get_option ('bindir')
+datadir = prefix / get_option ('datadir')
+libdir = prefix / get_option ('libdir')
+libexecdir = prefix / get_option ('libexecdir')
+localedir = prefix / get_option ('localedir')
+servicedir = datadir / 'dbus-1' / 'services'
+options_dir = datadir / meson.project_name() / 'options'
+plugins_dir = libdir / meson.project_name() / 'plugins'
config_h = configuration_data ()
config_h.set_quoted ('APPLICATION_ID', application_id)
@@ -92,7 +92,7 @@ add_project_arguments (
)
meson.add_install_script (
- join_paths ('build-aux', 'post_install.py'),
+ 'build-aux' / 'post_install.py',
datadir
)
diff --git a/src/meson.build b/src/meson.build
index 9955f645..a53d9859 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,5 +1,5 @@
-vapi_dir = join_paths (datadir, 'vala', 'vapi')
-gamepad_dir = join_paths (srcdir, 'gamepad')
+vapi_dir = datadir / 'vala' / 'vapi'
+gamepad_dir = srcdir / 'gamepad'
vala_args = [
'--vapidir', vapi_dir,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]