From 764402d8b945f7abbfa5f68a6d16c94c635f7ffe Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 14 May 2024 21:22:58 +0200 Subject: Merging upstream version 2.40.1. Signed-off-by: Daniel Baumann --- libblkid/meson.build | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'libblkid/meson.build') diff --git a/libblkid/meson.build b/libblkid/meson.build index 5a28bdf..73ea088 100644 --- a/libblkid/meson.build +++ b/libblkid/meson.build @@ -1,4 +1,9 @@ dir_libblkid = include_directories('.', 'src') +if not build_libblkid + blkid_dep = disabler() + blkid_static_dep = disabler() + subdir_done() +endif defs = configuration_data() defs.set('LIBBLKID_DATE', libblkid_date) @@ -131,27 +136,34 @@ if build_libblkid and not have_dirfd and not have_ddfd error('neither dirfd nor ddfd are available') endif +libblkid_link_depends = [] +libblkid_link_args = [] + +if cc.has_link_argument('-Wl,--version-script=@0@'.format(libblkid_sym_path)) + libblkid_link_depends += [libblkid_sym] + libblkid_link_args += ['-Wl,--version-script=@0@'.format(libblkid_sym_path)] +endif + lib_blkid = both_libraries( 'blkid', list_h, lib_blkid_sources, include_directories : [dir_include, dir_libblkid], - link_depends : libblkid_sym, + link_depends : libblkid_link_depends, version : libblkid_version, - link_args : ['-Wl,--version-script=@0@'.format(libblkid_sym_path)], + link_args : libblkid_link_args, link_with : lib_common, dependencies : build_libblkid ? [lib_econf] : disabler(), install : build_libblkid) blkid_dep = declare_dependency(link_with: lib_blkid, include_directories: '.') lib_blkid_static = lib_blkid.get_static_lib() +blkid_static_dep = declare_dependency(link_with: lib_blkid_static, include_directories: '.') -if build_libblkid - pkgconfig.generate(lib_blkid, - description : 'Block device id library', - subdirs : 'blkid', - version : pc_version) - if meson.version().version_compare('>=0.54.0') - meson.override_dependency('blkid', blkid_dep) - endif +pkgconfig.generate(lib_blkid, + description : 'Block device id library', + subdirs : 'blkid', + version : pc_version) +if meson.version().version_compare('>=0.54.0') + meson.override_dependency('blkid', blkid_dep) endif -- cgit v1.2.3