Commit 5360ea5f authored by Felipe Borges's avatar Felipe Borges 👣 Committed by Felipe Borges

build: Make RDP support optional

To build without RDP support:
  meson _build -Drdp=false

RDP is enabled by default.

The reason to build without RDP would be the lack of the freerdp
dependency.
parent c7415c09
......@@ -12,6 +12,10 @@ option ('ovirt',
type: 'boolean',
value: true)
option ('rdp',
type: 'boolean',
value: true)
option ('installed_tests',
type: 'boolean',
value: false,
......
......@@ -154,17 +154,22 @@ if get_option('ovirt')
]
endif
# Gtk-fRDP
pkgdatadir = join_paths (data_dir, meson.project_name ())
gtk_frdp = subproject(
'gtk-frdp',
default_options: [
'pkgdatadir=' + pkgdatadir,
'pkglibdir=' + pkglibdir
]
)
if get_option('rdp')
vala_sources += 'rdp-display.vala'
pkgdatadir = join_paths (data_dir, meson.project_name ())
gtk_frdp = subproject(
'gtk-frdp',
default_options: [
'pkgdatadir=' + pkgdatadir,
'pkglibdir=' + pkglibdir
]
)
dependencies += gtk_frdp.get_variable('gtk_frdp_vapi')
vala_args += '--define=HAVE_RDP'
dependencies += gtk_frdp.get_variable('gtk_frdp_vapi')
endif
executable ('gnome-boxes', vala_sources + resources,
include_directories: config_h_dir,
......
// This file is part of GNOME Boxes. License: LGPLv2+
using Gtk;
using Frdp;
private class Boxes.FrdpDisplay: Frdp.Display {
public override bool authenticate (out string username, out string password, out string domain) {
......
......@@ -35,9 +35,10 @@ public RemoteMachine (CollectionSource source) throws Boxes.Error {
case "vnc":
return new VncDisplay.with_uri (config, source.uri);
#if HAVE_RDP
case "rdp":
return new RdpDisplay.with_uri (config, source.uri);
#endif
default:
throw new Boxes.Error.INVALID ("unsupported display of type " + type);
}
......
......@@ -363,8 +363,10 @@ private void prepare_for_uri (string uri_as_text, string? filename = null) throw
source.source_type = "spice";
} else if (uri.scheme == "vnc") {
// accept any vnc:// uri
#if HAVE_RDP
} else if (uri.scheme == "rdp") {
// accept any rdp:// uri
#endif
} else if (uri.scheme.has_prefix ("qemu")) {
// accept any qemu..:// uri
source.source_type = "libvirt";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment