Meson has a global option -Ddefault_library which determines whether to
build all generic libraries as static, shared, or both. When creating a
library of the same name twice, once with library() and once with either
shared_library() or static_library(), some values for -Ddefault_library
will result in a fatal configuration error because multiple rules try to
create libXXX.a or libXXX.so
The reason for creating these additional copies of the library is in
order to optionally build some programs as both "prog" and "prog.static"
(and the latter is, of course, static). So depending on the
default_library value may not be desirable.
dependencies : build_libfdisk ? [] : disabler())
lib_fdisk_static = static_library(
- 'fdisk',
+ 'fdisk_static',
link_whole : lib__fdisk,
link_with : [lib_common,
lib_blkid.get_static_lib(),
dir_libblkid])
lib_mount_static = static_library(
- 'mount',
+ 'mount_static',
link_whole : lib__mount,
link_with : [lib_common,
lib_blkid.get_static_lib()],