mirror of https://gitee.com/openkylin/libvirt.git
rpc: Build only when XDR is available
Our RPC layer is as tied to XDR as possible. Therefore, if we haven't detected and XDR library there's not much sense in trying to build RPC layer. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
1bbcc79e0e
commit
377f67d5b3
|
@ -83,59 +83,67 @@ rpc_client_sources = [
|
||||||
'virnetclient.c',
|
'virnetclient.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
virt_rpc_lib = static_library(
|
if conf.has('WITH_REMOTE')
|
||||||
'virt_net_rpc',
|
virt_rpc_lib = static_library(
|
||||||
[
|
'virt_net_rpc',
|
||||||
rpc_sources,
|
[
|
||||||
rpc_gen_headers,
|
rpc_sources,
|
||||||
rpc_gen_sources,
|
rpc_gen_headers,
|
||||||
],
|
rpc_gen_sources,
|
||||||
dependencies: [
|
],
|
||||||
gnutls_dep,
|
dependencies: [
|
||||||
libssh2_dep,
|
gnutls_dep,
|
||||||
libssh_dep,
|
libssh2_dep,
|
||||||
sasl_dep,
|
libssh_dep,
|
||||||
secdriver_dep,
|
sasl_dep,
|
||||||
src_dep,
|
secdriver_dep,
|
||||||
xdr_dep,
|
src_dep,
|
||||||
],
|
xdr_dep,
|
||||||
)
|
],
|
||||||
|
)
|
||||||
|
|
||||||
check_protocols += {
|
check_protocols += {
|
||||||
'name': 'virnetprotocol',
|
'name': 'virnetprotocol',
|
||||||
'lib': virt_rpc_lib,
|
'lib': virt_rpc_lib,
|
||||||
}
|
}
|
||||||
|
|
||||||
check_protocols += {
|
check_protocols += {
|
||||||
'name': 'virkeepaliveprotocol',
|
'name': 'virkeepaliveprotocol',
|
||||||
'lib': virt_rpc_lib,
|
'lib': virt_rpc_lib,
|
||||||
}
|
}
|
||||||
|
|
||||||
virt_rpc_server_lib = static_library(
|
virt_rpc_server_lib = static_library(
|
||||||
'virt_net_rpc_server',
|
'virt_net_rpc_server',
|
||||||
[
|
[
|
||||||
rpc_server_sources,
|
rpc_server_sources,
|
||||||
rpc_gen_headers,
|
rpc_gen_headers,
|
||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
sasl_dep,
|
sasl_dep,
|
||||||
src_dep,
|
src_dep,
|
||||||
xdr_dep,
|
xdr_dep,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
virt_rpc_client_lib = static_library(
|
virt_rpc_client_lib = static_library(
|
||||||
'virt_net_rpc_client',
|
'virt_net_rpc_client',
|
||||||
[
|
[
|
||||||
rpc_client_sources,
|
rpc_client_sources,
|
||||||
rpc_gen_headers,
|
rpc_gen_headers,
|
||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
sasl_dep,
|
sasl_dep,
|
||||||
src_dep,
|
src_dep,
|
||||||
xdr_dep,
|
xdr_dep,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
libvirt_libs += [
|
||||||
|
virt_rpc_lib,
|
||||||
|
virt_rpc_client_lib,
|
||||||
|
virt_rpc_server_lib,
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
rpc_inc_dir = include_directories('.')
|
rpc_inc_dir = include_directories('.')
|
||||||
|
|
||||||
|
@ -143,9 +151,3 @@ rpc_dep = declare_dependency(
|
||||||
include_directories: [ rpc_inc_dir ],
|
include_directories: [ rpc_inc_dir ],
|
||||||
sources: [ rpc_gen_headers ],
|
sources: [ rpc_gen_headers ],
|
||||||
)
|
)
|
||||||
|
|
||||||
libvirt_libs += [
|
|
||||||
virt_rpc_lib,
|
|
||||||
virt_rpc_client_lib,
|
|
||||||
virt_rpc_server_lib,
|
|
||||||
]
|
|
||||||
|
|
Loading…
Reference in New Issue