mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
Drop libratbag as separate library
Now that ratbagd is part of libratbag, the DBus interface is the preferred way to interact with a device. Shipping libratbag as a .so file means we have to worry about two ABIs when it's unlikely that anyone ever uses the libratbag.so directly. Make it a static library internally instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
30
meson.build
30
meson.build
@@ -17,16 +17,11 @@ ratbagd_sha = r.stdout().strip()
|
||||
# b) If interfaces have been changed or added, but binary compatibility has
|
||||
# been preserved, change to C+1:0:A+1
|
||||
# c) If the interface is the same as the previous version, change to C:R+1:A
|
||||
libratbag_so_c=4
|
||||
libratbag_so_r=3
|
||||
libratbag_so_a=0
|
||||
liblur_so_c=3
|
||||
liblur_so_r=3
|
||||
liblur_so_a=0
|
||||
|
||||
# convert to sonames
|
||||
libratbag_so_version = '@0@.@1@.@2@'.format((libratbag_so_c - libratbag_so_a),
|
||||
libratbag_so_a, libratbag_so_r)
|
||||
liblur_so_version = '@0@.@1@.@2@'.format((liblur_so_c-liblur_so_a),
|
||||
liblur_so_a, liblur_so_r)
|
||||
|
||||
@@ -125,9 +120,8 @@ pkgconfig.generate (
|
||||
)
|
||||
|
||||
#### libratbag.so ####
|
||||
install_headers('src/libratbag.h')
|
||||
|
||||
src_libratbag = [
|
||||
'src/libratbag.h',
|
||||
'src/driver-etekcity.c',
|
||||
'src/driver-hidpp20.c',
|
||||
'src/driver-hidpp10.c',
|
||||
@@ -161,16 +155,10 @@ libratbag_version_h = configure_file(
|
||||
install: false,
|
||||
)
|
||||
|
||||
mapfile = 'src/libratbag.sym'
|
||||
version_flag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
|
||||
lib_libratbag = shared_library('ratbag',
|
||||
lib_libratbag = static_library('ratbag',
|
||||
src_libratbag,
|
||||
include_directories : include_directories('.'),
|
||||
dependencies : deps_libratbag,
|
||||
version : libratbag_so_version,
|
||||
link_args : version_flag,
|
||||
link_depends : mapfile,
|
||||
install : true,
|
||||
)
|
||||
|
||||
dep_libratbag = declare_dependency(
|
||||
@@ -178,20 +166,6 @@ dep_libratbag = declare_dependency(
|
||||
dependencies : deps_libratbag
|
||||
)
|
||||
|
||||
pkgconfigdata = configuration_data()
|
||||
pkgconfigdata.set('prefix', get_option('prefix'))
|
||||
pkgconfigdata.set('libdir', get_option('libdir'))
|
||||
pkgconfigdata.set('datadir', get_option('datadir'))
|
||||
pkgconfigdata.set('includedir', get_option('includedir'))
|
||||
pkgconfigdata.set('LIBRATBAG_VERSION', meson.project_version())
|
||||
pkgconfigfile = configure_file(
|
||||
input : 'src/libratbag.pc.in',
|
||||
output : 'libratbag.pc',
|
||||
configuration : pkgconfigdata,
|
||||
install : true,
|
||||
install_dir : get_option('libdir') + '/pkgconfig'
|
||||
)
|
||||
|
||||
#### libshared.a ####
|
||||
src_libshared = [
|
||||
'tools/shared.c',
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
prefix=@prefix@
|
||||
datadir=${prefix}/@datadir@
|
||||
pkgdatadir=${datadir}/libratbag
|
||||
libdir=${prefix}/@libdir@
|
||||
includedir=${prefix}/@includedir@
|
||||
|
||||
Name: Libratbag
|
||||
Description: Mouse configuration library
|
||||
Version: @LIBRATBAG_VERSION@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lratbag
|
||||
Libs.private: -lm -lrt
|
||||
Reference in New Issue
Block a user