mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
meson: Unify handling of directories used for loadable modules
Currently the directories that are searched for each possible kind of loadable module are created as a side effect of installing the corresponding module, which means that their availability depends on the exact list of features that have been enabled. Create them explicitly ahead of time instead, ensuring consistency. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
e797c3e3b3
commit
676453a0a7
@ -134,6 +134,11 @@ if sshconfdir == ''
|
||||
sshconfdir = sysconfdir / 'ssh' / 'ssh_config.d'
|
||||
endif
|
||||
|
||||
connection_driver_install_dir = libdir / 'libvirt' / 'connection-driver'
|
||||
storage_backend_install_dir = libdir / 'libvirt' / 'storage-backend'
|
||||
storage_file_install_dir = libdir / 'libvirt' / 'storage-file'
|
||||
lock_driver_install_dir = libdir / 'libvirt' / 'lock-driver'
|
||||
|
||||
|
||||
# generate configmake.h header
|
||||
|
||||
|
@ -99,8 +99,6 @@ if conf.has('WITH_LIBVIRTD')
|
||||
'lib': lockd_lib_impl,
|
||||
}
|
||||
|
||||
lockdriver_dir = libdir / 'libvirt' / 'lock-driver'
|
||||
|
||||
virt_modules += {
|
||||
'name': 'lockd',
|
||||
'name_prefix': '',
|
||||
@ -113,7 +111,7 @@ if conf.has('WITH_LIBVIRTD')
|
||||
'link_args': [
|
||||
libvirt_no_undefined,
|
||||
],
|
||||
'install_dir': lockdriver_dir,
|
||||
'install_dir': lock_driver_install_dir,
|
||||
}
|
||||
|
||||
if conf.has('WITH_SANLOCK')
|
||||
@ -129,7 +127,7 @@ if conf.has('WITH_LIBVIRTD')
|
||||
'link_args': [
|
||||
libvirt_no_undefined,
|
||||
],
|
||||
'install_dir': lockdriver_dir,
|
||||
'install_dir': lock_driver_install_dir,
|
||||
}
|
||||
endif
|
||||
|
||||
|
@ -145,7 +145,7 @@ libvirt_libs = []
|
||||
# * link_with - static libraries to link with (optional, default [])
|
||||
# * link_whole - static libraries to include (optional, default [])
|
||||
# * link_args - arguments for linker (optional, default [])
|
||||
# * install_dir - installation directory (optional, default libdir / 'libvirt' / 'connection-driver'
|
||||
# * install_dir - installation directory (optional, default connection_driver_install_dir)
|
||||
virt_modules = []
|
||||
|
||||
# virt_daemons:
|
||||
@ -611,7 +611,7 @@ foreach module : virt_modules
|
||||
module.get('link_args', []),
|
||||
],
|
||||
install: true,
|
||||
install_dir: module.get('install_dir', libdir / 'libvirt' / 'connection-driver'),
|
||||
install_dir: module.get('install_dir', connection_driver_install_dir),
|
||||
install_rpath: libvirt_rpath,
|
||||
)
|
||||
set_variable('@0@_module'.format(module['name'].underscorify()), mod)
|
||||
@ -955,6 +955,15 @@ virt_install_dirs += [
|
||||
localstatedir / 'lib' / 'libvirt' / 'boot',
|
||||
]
|
||||
|
||||
if conf.has('WITH_LIBVIRTD')
|
||||
virt_install_dirs += [
|
||||
connection_driver_install_dir,
|
||||
storage_backend_install_dir,
|
||||
storage_file_install_dir,
|
||||
lock_driver_install_dir,
|
||||
]
|
||||
endif
|
||||
|
||||
meson.add_install_script(
|
||||
meson_python_prog.full_path(), python3_prog.full_path(), meson_install_dirs_prog.full_path(),
|
||||
virt_install_dirs,
|
||||
|
@ -59,8 +59,6 @@ storage_backend_zfs_sources = [
|
||||
'storage_backend_zfs.c',
|
||||
]
|
||||
|
||||
storage_backend_install_dir = libdir / 'libvirt' / 'storage-backend'
|
||||
|
||||
if conf.has('WITH_STORAGE')
|
||||
storage_driver_impl_lib = static_library(
|
||||
'virt_storage_driver_impl',
|
||||
|
@ -10,8 +10,6 @@ storage_file_gluster_sources = [
|
||||
'storage_file_backend_gluster.c',
|
||||
]
|
||||
|
||||
storage_file_install_dir = libdir / 'libvirt' / 'storage-file'
|
||||
|
||||
virt_storage_file_lib = static_library(
|
||||
'virt_storage_file',
|
||||
[
|
||||
|
Loading…
x
Reference in New Issue
Block a user