mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
meson: Convert fidsk to meson feature
By making this a disabler dependency, we can slightly simplify the code and it als fixes the build for -Dfdisk=disabled as we failed to create a fallback empty libshared_fdisk variable.
This commit is contained in:
parent
43abc59a27
commit
9ee80846f8
16
meson.build
16
meson.build
@ -1119,17 +1119,11 @@ endif
|
||||
libmount = dependency('mount',
|
||||
version : fuzzer_build ? '>= 0' : '>= 2.30')
|
||||
|
||||
want_libfdisk = get_option('fdisk')
|
||||
if want_libfdisk != 'false' and not skip_deps
|
||||
libfdisk = dependency('fdisk',
|
||||
version : '>= 2.32',
|
||||
required : want_libfdisk == 'true')
|
||||
have = libfdisk.found()
|
||||
else
|
||||
have = false
|
||||
libfdisk = []
|
||||
endif
|
||||
conf.set10('HAVE_LIBFDISK', have)
|
||||
libfdisk = dependency('fdisk',
|
||||
version : '>= 2.32',
|
||||
disabler : true,
|
||||
required : get_option('fdisk'))
|
||||
conf.set10('HAVE_LIBFDISK', libfdisk.found())
|
||||
|
||||
want_passwdqc = get_option('passwdqc')
|
||||
want_pwquality = get_option('pwquality')
|
||||
|
@ -373,7 +373,7 @@ option('audit', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : '
|
||||
description : 'libaudit support')
|
||||
option('blkid', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||
description : 'libblkid support')
|
||||
option('fdisk', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
option('fdisk', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||
description : 'libfdisk support')
|
||||
option('kmod', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||
description : 'support for loadable modules')
|
||||
|
@ -120,7 +120,7 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
|
||||
-D acl=enabled
|
||||
-D audit=enabled
|
||||
-D blkid=enabled
|
||||
-D fdisk=true
|
||||
-D fdisk=enabled
|
||||
-D kmod=enabled
|
||||
-D pam=true
|
||||
-D pwquality=true
|
||||
|
@ -344,13 +344,11 @@ shared_fdisk_sources = files(
|
||||
'fdisk-util.c',
|
||||
)
|
||||
|
||||
if get_option('fdisk') != 'false'
|
||||
libshared_fdisk = static_library(
|
||||
'shared-fdisk',
|
||||
shared_fdisk_sources,
|
||||
include_directories : includes,
|
||||
dependencies : [libfdisk,
|
||||
userspace],
|
||||
c_args : ['-fvisibility=default'],
|
||||
build_by_default : false)
|
||||
endif
|
||||
libshared_fdisk = static_library(
|
||||
'shared-fdisk',
|
||||
shared_fdisk_sources,
|
||||
include_directories : includes,
|
||||
dependencies : [libfdisk,
|
||||
userspace],
|
||||
c_args : ['-fvisibility=default'],
|
||||
build_by_default : false)
|
||||
|
Loading…
Reference in New Issue
Block a user