Commit 0d7e351f authored by Arun Raghavan's avatar Arun Raghavan

build-sys: meson: Add symbol versioning as in autotools

Adds the -version-script linker argument that we use with autotools to
version symbols in our public API.
parent 34a8c3aa
...@@ -70,13 +70,15 @@ if glib_dep.found() ...@@ -70,13 +70,15 @@ if glib_dep.found()
libpulse_headers += 'glib-mainloop.h' libpulse_headers += 'glib-mainloop.h'
endif endif
versioning_link_args = '-Wl,-version-script=' + join_paths(meson.source_root(), 'src', 'map-file')
libpulse = shared_library('pulse', libpulse = shared_library('pulse',
libpulse_sources, libpulse_sources,
libpulse_headers, libpulse_headers,
version : libpulse_version, version : libpulse_version,
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
c_args : [pa_c_args], c_args : [pa_c_args],
link_args : [nodelete_link_args], link_args : [nodelete_link_args, versioning_link_args],
install : true, install : true,
install_rpath : privlibdir, install_rpath : privlibdir,
dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep], dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep],
...@@ -94,7 +96,7 @@ libpulse_simple = shared_library('pulse-simple', ...@@ -94,7 +96,7 @@ libpulse_simple = shared_library('pulse-simple',
'simple.h', 'simple.h',
version : libpulse_simple_version, version : libpulse_simple_version,
c_args : [pa_c_args], c_args : [pa_c_args],
link_args : [nodelete_link_args], link_args : [nodelete_link_args, versioning_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep], dependencies : [libpulse_dep, libpulsecommon_dep],
install : true, install : true,
...@@ -109,7 +111,7 @@ if glib_dep.found() ...@@ -109,7 +111,7 @@ if glib_dep.found()
'glib-mainloop.h', 'glib-mainloop.h',
version : libpulse_mainloop_glib_version, version : libpulse_mainloop_glib_version,
c_args : [pa_c_args], c_args : [pa_c_args],
link_args : [nodelete_link_args], link_args : [nodelete_link_args, versioning_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, glib_dep], dependencies : [libpulse_dep, libpulsecommon_dep, glib_dep],
install : true, install : true,
......
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