summaryrefslogtreecommitdiffstats
path: root/libmount/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'libmount/meson.build')
-rw-r--r--libmount/meson.build44
1 files changed, 23 insertions, 21 deletions
diff --git a/libmount/meson.build b/libmount/meson.build
index d1262e7..6b16aab 100644
--- a/libmount/meson.build
+++ b/libmount/meson.build
@@ -1,3 +1,9 @@
+if not build_libmount
+ mount_dep = disabler()
+ mount_static_dep = disabler()
+ subdir_done()
+endif
+
dir_libmount = include_directories('.', 'src')
defs = configuration_data()
@@ -70,16 +76,16 @@ lib__mount = static_library(
'_mount',
lib_mount_sources,
include_directories : [dir_include,
- dir_libmount,
- dir_libblkid])
+ dir_libmount],
+ dependencies : [blkid_dep])
lib_mount_static = static_library(
'mount_static',
link_whole : lib__mount,
- link_with : [lib_common,
- lib_blkid.get_static_lib()],
- dependencies : [realtime_libs],
+ link_with : [lib_common],
+ dependencies : [blkid_static_dep, realtime_libs],
install : false)
+mount_static_dep = declare_dependency(link_with: lib_mount_static, include_directories: '.')
lib__mount_deps = [
lib_selinux,
@@ -90,25 +96,21 @@ lib_mount = library(
'mount',
link_whole : lib__mount,
include_directories : [dir_include,
- dir_libmount,
- dir_libblkid],
+ dir_libmount],
link_depends : libmount_sym,
version : libmount_version,
link_args : ['-Wl,--version-script=@0@'.format(libmount_sym_path)],
- link_with : [lib_common,
- lib_blkid],
- dependencies : lib__mount_deps,
+ link_with : [lib_common],
+ dependencies : lib__mount_deps + blkid_dep,
install : build_libmount)
mount_dep = declare_dependency(link_with: lib_mount, include_directories: '.')
-if build_libmount
- pkgconfig.generate(lib_mount,
- description : 'mount library',
- subdirs : 'libmount',
- version : pc_version)
- if meson.version().version_compare('>=0.54.0')
- meson.override_dependency('mount', mount_dep)
- endif
+pkgconfig.generate(lib_mount,
+ description : 'mount library',
+ subdirs : 'libmount',
+ version : pc_version)
+if meson.version().version_compare('>=0.54.0')
+ meson.override_dependency('mount', mount_dep)
endif
libmount_tests = [
@@ -136,9 +138,9 @@ if program_tests
exe = executable(
test_name,
'src/' + libmount_test_src_override.get(libmount_test, libmount_test) + '.c',
- include_directories : [dir_include, dir_libblkid],
- link_with : [lib__mount, lib_common, lib_blkid_static],
- dependencies : lib__mount_deps,
+ include_directories : [dir_include],
+ link_with : [lib__mount, lib_common],
+ dependencies : lib__mount_deps + blkid_static_dep,
c_args : ['-DTEST_PROGRAM'],
)
# the test-setup expects the helpers in the toplevel build-directory