make spa-lib versioned

Fixes #60
This commit is contained in:
Wim Taymans 2018-08-13 16:14:14 +02:00
parent ef7903d328
commit 60d4473e7b
4 changed files with 7 additions and 5 deletions

View File

@ -17,6 +17,7 @@ else
pipewire_version_nano = 0
endif
spaversion = '0.1'
apiversion = '0.2'
soversion = 1
libversion = '@0@.@1@.0'.format(soversion, pipewire_version_minor.to_int() * 100 + pipewire_version_micro.to_int())

View File

@ -11,13 +11,13 @@ pkgconf.set('VERSION', pipewire_version)
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
pkg_files = [
'libpipewire',
'libspa',
[ 'libpipewire', apiversion ],
[ 'libspa', spaversion ],
]
foreach p : pkg_files
infile = p + '.pc.in'
outfile = p + '-@0@.pc'.format(apiversion)
infile = p.get(0) + '.pc.in'
outfile = p.get(0) + '-@0@.pc'.format(p.get(1))
configure_file(input : infile,
output : outfile,
configuration : pkgconf,

View File

@ -8,7 +8,7 @@ install_headers(spalib_headers, subdir : 'spa/lib')
spalib_sources = ['debug.c',
'pod.c' ]
spalib = shared_library('spa-lib',
spalib = shared_library('spa-lib-@0@'.format(spaversion),
spalib_sources,
version : libversion,
soversion : soversion,

View File

@ -1,5 +1,6 @@
#project('spa', 'c')
alsa_dep = dependency('alsa')
v4l2_dep = dependency('libv4l2')
x11_dep = dependency('x11', required : false)