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(a)redhat.com>
---
src/rpc/meson.build | 112 ++++++++++++++++++++++----------------------
1 file changed, 57 insertions(+), 55 deletions(-)
diff --git a/src/rpc/meson.build b/src/rpc/meson.build
index 6c32610d29..7fde92e6cf 100644
--- a/src/rpc/meson.build
+++ b/src/rpc/meson.build
@@ -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,
-]
--
2.32.0