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',
|
||||
]
|
||||
|
||||
virt_rpc_lib = static_library(
|
||||
'virt_net_rpc',
|
||||
[
|
||||
rpc_sources,
|
||||
rpc_gen_headers,
|
||||
rpc_gen_sources,
|
||||
],
|
||||
dependencies: [
|
||||
gnutls_dep,
|
||||
libssh2_dep,
|
||||
libssh_dep,
|
||||
sasl_dep,
|
||||
secdriver_dep,
|
||||
src_dep,
|
||||
xdr_dep,
|
||||
],
|
||||
)
|
||||
if conf.has('WITH_REMOTE')
|
||||
virt_rpc_lib = static_library(
|
||||
'virt_net_rpc',
|
||||
[
|
||||
rpc_sources,
|
||||
rpc_gen_headers,
|
||||
rpc_gen_sources,
|
||||
],
|
||||
dependencies: [
|
||||
gnutls_dep,
|
||||
libssh2_dep,
|
||||
libssh_dep,
|
||||
sasl_dep,
|
||||
secdriver_dep,
|
||||
src_dep,
|
||||
xdr_dep,
|
||||
],
|
||||
)
|
||||
|
||||
check_protocols += {
|
||||
'name': 'virnetprotocol',
|
||||
'lib': virt_rpc_lib,
|
||||
}
|
||||
check_protocols += {
|
||||
'name': 'virnetprotocol',
|
||||
'lib': virt_rpc_lib,
|
||||
}
|
||||
|
||||
check_protocols += {
|
||||
'name': 'virkeepaliveprotocol',
|
||||
'lib': virt_rpc_lib,
|
||||
}
|
||||
check_protocols += {
|
||||
'name': 'virkeepaliveprotocol',
|
||||
'lib': virt_rpc_lib,
|
||||
}
|
||||
|
||||
virt_rpc_server_lib = static_library(
|
||||
'virt_net_rpc_server',
|
||||
[
|
||||
rpc_server_sources,
|
||||
rpc_gen_headers,
|
||||
],
|
||||
dependencies: [
|
||||
sasl_dep,
|
||||
src_dep,
|
||||
xdr_dep,
|
||||
],
|
||||
)
|
||||
virt_rpc_server_lib = static_library(
|
||||
'virt_net_rpc_server',
|
||||
[
|
||||
rpc_server_sources,
|
||||
rpc_gen_headers,
|
||||
],
|
||||
dependencies: [
|
||||
sasl_dep,
|
||||
src_dep,
|
||||
xdr_dep,
|
||||
],
|
||||
)
|
||||
|
||||
virt_rpc_client_lib = static_library(
|
||||
'virt_net_rpc_client',
|
||||
[
|
||||
rpc_client_sources,
|
||||
rpc_gen_headers,
|
||||
],
|
||||
dependencies: [
|
||||
sasl_dep,
|
||||
src_dep,
|
||||
xdr_dep,
|
||||
],
|
||||
)
|
||||
virt_rpc_client_lib = static_library(
|
||||
'virt_net_rpc_client',
|
||||
[
|
||||
rpc_client_sources,
|
||||
rpc_gen_headers,
|
||||
],
|
||||
dependencies: [
|
||||
sasl_dep,
|
||||
src_dep,
|
||||
xdr_dep,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += [
|
||||
virt_rpc_lib,
|
||||
virt_rpc_client_lib,
|
||||
virt_rpc_server_lib,
|
||||
]
|
||||
endif
|
||||
|
||||
rpc_inc_dir = include_directories('.')
|
||||
|
||||
|
@ -143,9 +151,3 @@ rpc_dep = declare_dependency(
|
|||
include_directories: [ rpc_inc_dir ],
|
||||
sources: [ rpc_gen_headers ],
|
||||
)
|
||||
|
||||
libvirt_libs += [
|
||||
virt_rpc_lib,
|
||||
virt_rpc_client_lib,
|
||||
virt_rpc_server_lib,
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue