[rhythmbox/wip/sam/meson] meson: Set SHARE_DIR correctly



commit b8091640653fd3e51bef8ca2dd643202e52d713d
Author: Sam Thursfield <sam afuera me uk>
Date:   Thu Oct 29 17:57:20 2020 +0100

    meson: Set SHARE_DIR correctly

 lib/meson.build           | 2 +-
 meson.build               | 1 +
 plugins/mpris/meson.build | 2 +-
 remote/dbus/meson.build   | 2 +-
 rhythmdb/meson.build      | 2 +-
 shell/meson.build         | 2 +-
 sources/meson.build       | 2 +-
 sources/sync/meson.build  | 2 +-
 8 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/lib/meson.build b/lib/meson.build
index 0c2e82f85..402752ca7 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -40,7 +40,7 @@ lib_sources = files(
 lib_c_args = [
   '-DG_LOG_DOMAIN="Rhythmbox"',
   '-DGNOMELOCALEDIR="' + datadir + '/locale"',
-  '-DSHARE_DIR="' + datadir + '"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
   '-DDATADIR="' + datadir + '"'
 ]
 
diff --git a/meson.build b/meson.build
index b63e2330c..65727ff06 100644
--- a/meson.build
+++ b/meson.build
@@ -243,6 +243,7 @@ use_no_strict_aliasing = cc.has_argument('-fno-strict-aliasing')
 
 datadir = get_option('prefix') / get_option('datadir')
 libdir = get_option('prefix') / get_option('libdir')
+pkgdatadir = datadir / 'rhythmbox'
 
 #################
 # Plugin support
diff --git a/plugins/mpris/meson.build b/plugins/mpris/meson.build
index 54cfbdf90..828164ce8 100644
--- a/plugins/mpris/meson.build
+++ b/plugins/mpris/meson.build
@@ -8,7 +8,7 @@ mpris_c_args = [
   '-DG_LOG_DOMAIN="Rhythmbox"',
   '-DPIXMAP_DIR="@0@"'.format(datadir / 'pixmaps'),
   '-DSHARE_DIR="@0@"'.format(datadir),
-  '-DDATADIR="@0@"'.format(datadir),
+  '-DDATADIR="@0@"'.format(pkgdatadir),
 ]
 
 shared_module('mpris',
diff --git a/remote/dbus/meson.build b/remote/dbus/meson.build
index 9a932f0d5..5bd0d840e 100644
--- a/remote/dbus/meson.build
+++ b/remote/dbus/meson.build
@@ -2,7 +2,7 @@ client_c_args = [
   '-DGNOMELOCALEDIR="' + datadir + '/locale"',
   '-DG_LOG_DOMAIN="Rhythmbox"',
   '-DPIXMAP_DIR="' + datadir + '/pixmaps"',
-  '-DSHARE_DIR="' + datadir + '"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
   '-DDATADIR="' + datadir + '"',
   '-D__EXTENSIONS__',
 ]
diff --git a/rhythmdb/meson.build b/rhythmdb/meson.build
index 4315c24cf..2598eaa02 100644
--- a/rhythmdb/meson.build
+++ b/rhythmdb/meson.build
@@ -35,7 +35,7 @@ endif
 c_args = [
   '-DGNOMELOCALEDIR="' + datadir + '/locale"',
   '-DG_LOG_DOMAIN="RhythmDB"',
-  '-DSHARE_DIR="' + datadir + '"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
   '-DDATADIR="' + datadir + '"'
 ]
 
diff --git a/shell/meson.build b/shell/meson.build
index d6c5be4ed..846136f64 100644
--- a/shell/meson.build
+++ b/shell/meson.build
@@ -76,7 +76,7 @@ shell_c_args = [
   '-DGNOMELOCALEDIR="' + datadir + '/locale"',
   '-DG_LOG_DOMAIN="Rhythmbox"',
   '-DPIXMAP_DIR="' + datadir + '/pixmaps"',
-  '-DSHARE_DIR="' + datadir + '"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
   '-DDATADIR="' + datadir + '"',
   '-DLIBDIR="' + libdir + '"',
   '-D__EXTENSIONS__',
diff --git a/sources/meson.build b/sources/meson.build
index f2a0cf9fe..b1e26b031 100644
--- a/sources/meson.build
+++ b/sources/meson.build
@@ -49,7 +49,7 @@ sources_c_args = [
   '-DGNOMELOCALEDIR="' + datadir + '/locale"',
   '-DG_LOG_DOMAIN="Rhythmbox"',
   '-DPIXMAP_DIR="' + datadir + '/pixmaps"',
-  '-DSHARE_DIR="' + datadir + '"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
   '-DDATADIR="' + datadir + '"',
 ]
 
diff --git a/sources/sync/meson.build b/sources/sync/meson.build
index 626341d0f..fd81a85d7 100644
--- a/sources/sync/meson.build
+++ b/sources/sync/meson.build
@@ -9,7 +9,7 @@ sourcesync_c_args = [
   '-DGNOMELOCALEDIR="' + datadir + '/locale"',
   '-DG_LOG_DOMAIN="Rhythmbox"',
   '-DPIXMAP_DIR="' + datadir + '/pixmaps"',
-  '-DSHARE_DIR="' + datadir + '"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
   '-DDATADIR="' + datadir + '"',
 ]
 


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