Commit 7f44a623 authored by Arun Raghavan's avatar Arun Raghavan

build-sys: meson: Correctly set up RPATH

This was being done automatically by autotools, now we need to manually
specify this for each executable/library with a dependency in a
non-standard directory.
parent f996ad06
......@@ -27,6 +27,7 @@ executable('pulseaudio',
pulseaudio_sources,
pulseaudio_headers,
install: true,
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_args : ['-ffast-math'],
link_with : [libpulsecore, libpulsecommon, libpulse],
......
......@@ -34,6 +34,7 @@ libalsa_util = shared_library('alsa-util',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, alsa_dep, dbus_dep, libm_dep, udev_dep],
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
)
......
......@@ -28,5 +28,6 @@ libbluez5_util = shared_library('bluez5-util',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep, sbc_dep],
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
)
......@@ -17,5 +17,6 @@ libwebrtc_util = shared_library('webrtc-util',
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, webrtc_dep],
link_args : [nodelete_link_args, '-Wl,--unresolved-symbols=ignore-in-object-files'],
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
)
......@@ -11,6 +11,7 @@ gsettings_helper = executable('gsettings-helper',
link_with : [libpulsecommon, libpulse],
dependencies : [gio_dep],
install_dir : pulselibexecdir,
install_rpath : privlibdir,
install : true,
)
......
......@@ -259,6 +259,10 @@ all_modules += [
# Generate a shared module object for each modules
# FIXME: Not all modules actually have a dep in modlibexecdir
# FIXME: meson doesn't support multiple RPATH arguments currently
rpath_dirs = join_paths(privlibdir) + ':' + join_paths(modlibexecdir)
foreach m : all_modules
name = m[0]
sources = m[1]
......@@ -273,6 +277,7 @@ foreach m : all_modules
include_directories : [configinc, topinc],
c_args : [pa_c_args, server_c_args, '-DPA_MODULE_NAME=' + name.underscorify()] + extra_flags,
install : true,
install_rpath : rpath_dirs,
install_dir : modlibexecdir,
dependencies : [thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep] + extra_deps,
link_args : [nodelete_link_args, '-Wl,--no-undefined' ],
......
......@@ -13,5 +13,6 @@ liboss_util = shared_library('oss-util',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
)
......@@ -14,6 +14,9 @@ libraop_headers = [
'raop-util.h',
]
# FIXME: meson doesn't support multiple RPATH arguments currently
rpath_dirs = join_paths(privlibdir) + ':' + join_paths(modlibexecdir)
libraop = shared_library('raop',
libraop_sources,
libraop_headers,
......@@ -22,5 +25,6 @@ libraop = shared_library('raop',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, librtp_dep, openssl_dep],
install : true,
install_rpath : rpath_dirs,
install_dir : modlibexecdir,
)
......@@ -22,6 +22,7 @@ librtp = shared_library('rtp',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
)
......
......@@ -78,6 +78,7 @@ libpulse = shared_library('pulse',
c_args : [pa_c_args],
link_args : [nodelete_link_args],
install : true,
install_rpath : privlibdir,
dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep],
implicit_include_directories : false)
......@@ -97,6 +98,7 @@ libpulse_simple = shared_library('pulse-simple',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep],
install : true,
install_rpath : privlibdir,
)
libpulse_simple_dep = declare_dependency(link_with: libpulse_simple)
......@@ -111,6 +113,7 @@ if glib_dep.found()
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, glib_dep],
install : true,
install_rpath : privlibdir,
)
libpulse_mainloop_glib_dep = declare_dependency(link_with: libpulse_mainloop_glib)
......
......@@ -191,6 +191,7 @@ libpulsecore = shared_library('pulsecore-' + pa_version_major_minor,
c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
install : true,
install_rpath : privlibdir,
install_dir : privlibdir,
link_with : libpulsecore_simd_lib,
dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep],
......@@ -210,6 +211,7 @@ libavahi_wrap = shared_library('avahi-wrap',
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, avahi_dep],
implicit_include_directories : false, # pulsecore/poll.h <vs> /usr/include/poll.h
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
)
......@@ -221,11 +223,15 @@ libcli = shared_library('cli',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
)
libcli_dep = declare_dependency(link_with: libcli)
# FIXME: meson doesn't support multiple RPATH arguments currently
rpath_dirs = join_paths(privlibdir) + ':' + join_paths(modlibexecdir)
libprotocol_cli = shared_library('protocol-cli',
'protocol-cli.c',
'protocol-cli.h',
......@@ -234,6 +240,7 @@ libprotocol_cli = shared_library('protocol-cli',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libcli_dep],
install : true,
install_rpath : rpath_dirs,
install_dir : modlibexecdir,
)
......@@ -245,6 +252,7 @@ libprotocol_http = shared_library('protocol-http',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
)
......@@ -256,6 +264,7 @@ libprotocol_native = shared_library('protocol-native',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep],
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
)
......@@ -267,5 +276,6 @@ libprotocol_simple = shared_library('protocol-simple',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
)
......@@ -12,6 +12,7 @@ pacat_aliases = [
executable('pacat',
pacat_sources,
install: true,
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
dependencies : [sndfile_dep],
......@@ -32,6 +33,7 @@ pactl_sources = [
executable('pactl',
pactl_sources,
install: true,
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
dependencies : [sndfile_dep],
......@@ -45,6 +47,7 @@ pasuspender_sources = [
executable('pasuspender',
pasuspender_sources,
install: true,
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
c_args : pa_c_args,
......@@ -57,6 +60,7 @@ pacmd_sources = [
executable('pacmd',
pacmd_sources,
install: true,
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
c_args : pa_c_args,
......@@ -70,6 +74,7 @@ if x11_dep.found()
executable('pax11publish',
pax11publish_sources,
install: true,
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
dependencies : [x11_dep],
......@@ -86,6 +91,7 @@ if cc.has_header('sys/soundcard.h')
libpulsecommon_sources,
install: true,
install_dir : padsplibdir,
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
link_args : [nodelete_link_args, '-ldl'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment