[rhythmbox/wip/sam/meson: 37/39] Fix binary install locations, and set rpath when installing



commit 357a5e6cb84929449fd68b4549adc29773f8fe34
Author: Sam Thursfield <sam afuera me uk>
Date:   Wed Nov 9 20:33:55 2016 +0000

    Fix binary install locations, and set rpath when installing
    
    The rpath is needed if we install to a non-standard prefix to avoid
    having to manually set LD_LIBRARY_PATH.

 meson.build          |    2 ++
 metadata/meson.build |    5 ++++-
 shell/meson.build    |    4 +++-
 3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 60d9fe1..34918ff 100644
--- a/meson.build
+++ b/meson.build
@@ -452,6 +452,8 @@ sourcesinc = include_directories('sources')
 sourcessyncinc = include_directories('sources/sync')
 widgetsinc = include_directories('widgets')
 
+rpath = '@0@/@1@'.format(get_option('prefix'), get_option('libdir'))
+
 subdir('data')
 
 subdir('lib')
diff --git a/metadata/meson.build b/metadata/meson.build
index 9788254..2102d77 100644
--- a/metadata/meson.build
+++ b/metadata/meson.build
@@ -55,4 +55,7 @@ executable('rhythmbox-metadata', metadata_dbus_service_sources,
   link_with: librbmetadatasvc,
   dependencies: [glib, gobject, gstreamer, gstreamer_pbutils, gtk],
   include_directories: [configinc, libinc],
-  install: true)
+  install: true,
+  install_dir: get_option('libexecdir'),
+  install_rpath: rpath
+)
diff --git a/shell/meson.build b/shell/meson.build
index 9ee153c..8f36942 100644
--- a/shell/meson.build
+++ b/shell/meson.build
@@ -130,5 +130,7 @@ executable('rhythmbox', 'main.c',
     podcastinc, pluginsinc, rhythmdbinc, shellinc, sourcesinc
   ],
   link_args: ['-export-dynamic', '-Wno-undef'],
-  link_with: librhythmbox_core
+  link_with: librhythmbox_core,
+  install: true,
+  install_rpath: rpath
 )


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