mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
meson: src: build libvirt-qemu.so library
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
dfa2f42a04
commit
96191634e9
@ -20,7 +20,6 @@ dnl
|
||||
AC_DEFUN([LIBVIRT_WIN_CHECK_SYMBOLS], [
|
||||
LIBVIRT_ADMIN_SYMBOL_FILE=admin/libvirt_admin.syms
|
||||
LIBVIRT_LXC_SYMBOL_FILE='$(srcdir)/libvirt_lxc.syms'
|
||||
LIBVIRT_QEMU_SYMBOL_FILE='$(srcdir)/libvirt_qemu.syms'
|
||||
case "$host" in
|
||||
*-*-mingw* )
|
||||
# Also set the symbol file to .def, so src/Makefile generates libvirt.def
|
||||
@ -28,10 +27,8 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_SYMBOLS], [
|
||||
# linker
|
||||
LIBVIRT_ADMIN_SYMBOL_FILE=admin/libvirt_admin.def
|
||||
LIBVIRT_LXC_SYMBOL_FILE=libvirt_lxc.def
|
||||
LIBVIRT_QEMU_SYMBOL_FILE=libvirt_qemu.def
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([LIBVIRT_ADMIN_SYMBOL_FILE])
|
||||
AC_SUBST([LIBVIRT_LXC_SYMBOL_FILE])
|
||||
AC_SUBST([LIBVIRT_QEMU_SYMBOL_FILE])
|
||||
])
|
||||
|
@ -65,7 +65,7 @@ COMMON_UNIT_VARS = \
|
||||
|
||||
# Set these variables before we include any of the subdirs as libvirt-admin.la
|
||||
# has to be installed after libvirt.la.
|
||||
lib_LTLIBRARIES += libvirt-qemu.la libvirt-lxc.la
|
||||
lib_LTLIBRARIES += libvirt-lxc.la
|
||||
|
||||
include util/Makefile.inc.am
|
||||
include security/Makefile.inc.am
|
||||
@ -209,7 +209,7 @@ check-local: check-protocol check-symfile check-symsorting \
|
||||
# depending on whether they are stored in git and/or used in the build.
|
||||
SYM_FILES += $(USED_SYM_FILES)
|
||||
GENERATED_SYM_FILES += \
|
||||
libvirt_qemu.def libvirt_lxc.def \
|
||||
libvirt_lxc.def \
|
||||
$(NULL)
|
||||
|
||||
|
||||
@ -253,16 +253,6 @@ libvirt_functions.stp: $(RPC_PROBE_FILES) $(top_srcdir)/scripts/gensystemtap.py
|
||||
|
||||
endif WITH_DTRACE_PROBES
|
||||
|
||||
libvirt_qemu_la_SOURCES = libvirt-qemu.c
|
||||
libvirt_qemu_la_LDFLAGS = \
|
||||
$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_QEMU_SYMBOL_FILE) \
|
||||
-version-info $(LIBVIRT_VERSION_INFO) \
|
||||
$(LIBVIRT_NODELETE) \
|
||||
$(AM_LDFLAGS) \
|
||||
$(NULL)
|
||||
libvirt_qemu_la_CFLAGS = $(AM_CFLAGS)
|
||||
libvirt_qemu_la_LIBADD = libvirt.la
|
||||
|
||||
libvirt_lxc_la_SOURCES = libvirt-lxc.c
|
||||
libvirt_lxc_la_LDFLAGS = \
|
||||
$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_LXC_SYMBOL_FILE) \
|
||||
|
@ -271,3 +271,53 @@ libvirt_lib = shared_library(
|
||||
version: libvirt_lib_version,
|
||||
soversion: libvirt_so_version,
|
||||
)
|
||||
|
||||
|
||||
# libvirt-qemu.syms symbol files
|
||||
|
||||
libvirt_qemu_syms = meson.current_source_dir() / 'libvirt_qemu.syms'
|
||||
libvirt_qemu_syms_file = libvirt_qemu_syms
|
||||
libvirt_qemu_syms_path = libvirt_qemu_syms
|
||||
if host_machine.system() == 'windows'
|
||||
libvirt_qemu_def = custom_target(
|
||||
'libvirt_qemu.def',
|
||||
input: libvirt_qemu_syms,
|
||||
output: 'libvirt_qemu.def',
|
||||
command: [
|
||||
meson_python_prog, python3_prog.path(), meson_gen_def_prog.path(),
|
||||
'@INPUT@', '@OUTPUT@',
|
||||
],
|
||||
)
|
||||
libvirt_qemu_syms_file = libvirt_qemu_def
|
||||
libvirt_qemu_syms_path = libvirt_qemu_def.full_path()
|
||||
endif
|
||||
|
||||
|
||||
# libvirt-qemu.so
|
||||
|
||||
libvirt_qemu_syms_flags = '@0@@1@'.format(
|
||||
version_script_flags,
|
||||
libvirt_qemu_syms_path,
|
||||
)
|
||||
|
||||
libvirt_qemu_lib = shared_library(
|
||||
'virt-qemu',
|
||||
'libvirt-qemu.c',
|
||||
dependencies: [
|
||||
src_dep,
|
||||
],
|
||||
link_args: [
|
||||
libvirt_nodelete,
|
||||
libvirt_qemu_syms_flags,
|
||||
],
|
||||
link_with: [
|
||||
libvirt_lib,
|
||||
],
|
||||
link_depends: [
|
||||
libvirt_qemu_syms_file,
|
||||
],
|
||||
install: true,
|
||||
install_rpath: libdir,
|
||||
version: libvirt_lib_version,
|
||||
soversion: libvirt_so_version,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user