Skip to content

Commit 1960add

Browse files
thotypoustrufae
authored andcommitted
Fix libsdb shared lib install
1 parent a332fb3 commit 1960add

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

meson.build

+5-3
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,9 @@ install_data(script_files, install_dir: r2_scripts)
502502

503503
libsdb_sp = subproject('sdb')
504504
libsdb_static = libsdb_sp.get_variable('libsdb_static')
505+
libsdb_dynamic = libsdb_sp.get_variable('libsdb').get_shared_lib()
505506
libsdb_includes = libsdb_sp.get_variable('sdb_inc')
507+
libsdb_version = libsdb_sp.get_variable('sdb_version')
506508

507509
sdb_dep = declare_dependency(
508510
link_whole: libsdb_static,
@@ -528,7 +530,7 @@ sdb_install = custom_target('r2sdb',
528530
install_dir : get_option('bindir'))
529531

530532
os_name = host_machine.system()
531-
lib_extension = '.so' # Default for Linux
533+
lib_extension = '.so.' + libsdb_version # Default for Linux
532534

533535
if os_name == 'darwin'
534536
lib_extension = '.dylib'
@@ -537,8 +539,8 @@ elif os_name == 'windows'
537539
endif
538540

539541
libsdb_install = custom_target('libr2sdb',
540-
input : libsdb_static,
541-
output : 'libr2sdb' + lib_extension,
542+
input : libsdb_dynamic,
543+
output : 'libsdb' + lib_extension,
542544
command : copyinout,
543545
install : true,
544546
install_dir : get_option('libdir'))

0 commit comments

Comments
 (0)