summaryrefslogtreecommitdiffstats
path: root/libblkid/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'libblkid/meson.build')
-rw-r--r--libblkid/meson.build32
1 files changed, 22 insertions, 10 deletions
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