| # Copyright 2016 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/c++/c++.gni") |
| import("//build/config/linux/pkg_config.gni") |
| import("//remoting/build/config/remoting_build.gni") |
| import("//third_party/webrtc/webrtc.gni") |
| import("//tools/generate_library_loader/generate_library_loader.gni") |
| import("//tools/generate_stubs/rules.gni") |
| |
| group("all_tests") { |
| testonly = true |
| } |
| |
| if (enable_me2me_host) { |
| copy("remoting_me2me_host_copy_script") { |
| sources = [ "linux_me2me_host.py" ] |
| outputs = [ "$root_build_dir/remoting/chrome-remote-desktop" ] |
| } |
| |
| copy("remoting_me2me_host_copy_pipewire_templates") { |
| sources = [ |
| "pipewire-media-session.conf.template", |
| "pipewire-pulse.conf.template", |
| "pipewire.conf.template", |
| "wireplumber.conf.template", |
| ] |
| outputs = [ "$root_build_dir/remoting/{{source_file_part}}" ] |
| } |
| |
| copy("remoting_me2me_host_copy_host_wrapper") { |
| sources = [ "remoting_me2me_host_wrapper.sh" ] |
| outputs = [ "$root_build_dir/remoting/chrome-remote-desktop-host" ] |
| } |
| |
| copy("remoting_me2me_host_copy_libremoting_core") { |
| sources = [ "$root_build_dir/libremoting_core.so" ] |
| outputs = [ "$root_build_dir/remoting/libremoting_core.so" ] |
| deps = [ "//remoting/host:remoting_core" ] |
| } |
| |
| remoting_localize("url_forwarder_desktop_entry") { |
| sources = [ "crd-url-forwarder.desktop.jinja2" ] |
| locale_list = remoting_locales_without_pseudolocales |
| locale_dir = resources_locale_dir |
| output = "$root_build_dir/remoting/{{source_name_part}}" |
| } |
| |
| copy("remoting_me2me_host_copy_setup_url_forwarder_script") { |
| sources = [ "configure_url_forwarder.py" ] |
| outputs = [ "$root_build_dir/remoting/setup-url-forwarder" ] |
| } |
| |
| executable("remoting_migrate_host") { |
| output_name = "remoting_migrate_host" |
| sources = [ "migrate_host_entry_point.cc" ] |
| |
| deps = [ |
| ":remoting_migrate_host_main_headers", |
| "//remoting/host:remoting_core", |
| ] |
| } |
| |
| executable("remote_session_info") { |
| sources = [ "remote_session_info_entry_point.cc" ] |
| |
| deps = [ |
| ":remote_session_info_main_headers", |
| "//remoting/host:remoting_core", |
| ] |
| } |
| |
| group("remoting_dev_me2me_host") { |
| deps = [ |
| ":remote_session_info", |
| ":remoting_me2me_host_copy_host_wrapper", |
| ":remoting_me2me_host_copy_libremoting_core", |
| ":remoting_me2me_host_copy_pipewire_templates", |
| ":remoting_me2me_host_copy_script", |
| ":remoting_me2me_host_copy_setup_url_forwarder_script", |
| ":remoting_migrate_host", |
| ":remoting_native_messaging_host", |
| ":url_forwarder_desktop_entry", |
| "//remoting/host:remoting_me2me_host", |
| "//remoting/host/remote_open_url", |
| "//remoting/host/webauthn:remote_webauthn", |
| ] |
| } |
| } |
| |
| source_set("gvariant") { |
| sources = [ |
| "gvariant_dict_builder.cc", |
| "gvariant_dict_builder.h", |
| "gvariant_ref.cc", |
| "gvariant_ref.h", |
| "gvariant_type.cc", |
| "gvariant_type.h", |
| ] |
| deps = [ |
| "//base", |
| "//remoting/base", |
| "//remoting/host/base", |
| ] |
| } |
| pkg_config("pipewire_config") { |
| packages = [ "libpipewire-0.3" ] |
| |
| # Don't link against libpipewire since it's loaded at runtime. |
| ignore_libs = true |
| } |
| |
| generate_library_loader("pipewire_loader") { |
| # The generated class will not be in any namespace, so we need to prefix the |
| # name to avoid name conflicts with other generated library loaders. |
| name = "RemotingPipewireLoader" |
| |
| # The output files will be in gen/library_loaders, so we need to add the |
| # `remoting_` prefix to avoid name conflicts with other generated library |
| # loaders. |
| output_h = "remoting_libpipewire.h" |
| output_cc = "remoting_libpipewire.cc" |
| header = "<pipewire/pipewire.h>" |
| config = ":pipewire_config" |
| functions = [ |
| "pw_init", |
| "pw_deinit", |
| "pw_thread_loop_new", |
| "pw_thread_loop_destroy", |
| "pw_thread_loop_stop", |
| "pw_thread_loop_start", |
| "pw_thread_loop_lock", |
| "pw_thread_loop_unlock", |
| "pw_thread_loop_get_loop", |
| "pw_context_new", |
| "pw_context_destroy", |
| "pw_context_connect", |
| "pw_core_disconnect", |
| "pw_properties_new", |
| "pw_stream_new", |
| "pw_stream_destroy", |
| "pw_stream_add_listener", |
| "pw_stream_connect", |
| "pw_stream_state_as_string", |
| "pw_stream_dequeue_buffer", |
| "pw_stream_queue_buffer", |
| "pw_stream_get_node_id", |
| "pw_core_get_registry", |
| "pw_proxy_add_object_listener", |
| "pw_proxy_destroy", |
| ] |
| } |
| |
| source_set("utils") { |
| sources = [ |
| "gdbus_connection_ref.cc", |
| "gdbus_connection_ref.h", |
| "gdbus_fd_list.cc", |
| "gdbus_fd_list.h", |
| ] |
| public_deps = [ ":gvariant" ] |
| deps = [ |
| "dbus_interfaces:interface_headers", |
| "//base", |
| "//remoting/base", |
| "//remoting/host/base", |
| "//ui/base", |
| ] |
| configs += [ "//build/linux:gio_config" ] |
| } |
| |
| source_set("host_types") { |
| sources = [ |
| "host_types.cc", |
| "host_types.h", |
| ] |
| deps = [ "//base" ] |
| } |
| |
| source_set("remoting_migrate_host_main_impl") { |
| sources = [ "migrate_host_main.cc" ] |
| deps = [ |
| ":host_types", |
| ":remoting_migrate_host_main_headers", |
| "//base", |
| "//remoting/base", |
| "//remoting/base:logging", |
| "//remoting/host:common", |
| "//remoting/host:host_main_headers", |
| "//remoting/host/base", |
| "//remoting/host/setup:common", |
| ] |
| } |
| |
| source_set("remoting_migrate_host_main_headers") { |
| sources = [ "migrate_host_main.h" ] |
| deps = [ "//remoting/host:host_main_headers" ] |
| } |
| |
| source_set("remote_session_info_main_headers") { |
| sources = [ "remote_session_info_main.h" ] |
| deps = [ "//remoting/host:host_main_headers" ] |
| } |
| |
| source_set("platform_impls") { |
| defines = [ "REMOTING_USE_X11" ] |
| sources = [ |
| "active_display_monitor_linux.cc", |
| "active_display_monitor_x11.cc", |
| "active_display_monitor_x11.h", |
| "audio_capturer_linux.cc", |
| "audio_pipe_reader.cc", |
| "audio_pipe_reader.h", |
| "capture_stream.h", |
| "capture_stream_manager.h", |
| "clipboard_gnome.cc", |
| "clipboard_gnome.h", |
| "clipboard_portal.cc", |
| "clipboard_portal.h", |
| "curtain_mode_wayland.cc", |
| "curtain_mode_wayland.h", |
| "curtain_mode_x11.cc", |
| "daemon_process_main.cc", |
| "desktop_display_info_loader_linux.cc", |
| "desktop_display_info_loader_x11.cc", |
| "desktop_display_info_loader_x11.h", |
| "desktop_resizer_linux.cc", |
| "desktop_resizer_x11.cc", |
| "desktop_resizer_x11.h", |
| "desktop_session_factory_linux.cc", |
| "desktop_session_factory_linux.h", |
| "ei_input_injector.cc", |
| "ei_input_injector.h", |
| "ei_keyboard_layout_monitor.cc", |
| "ei_keyboard_layout_monitor.h", |
| "ei_keymap.cc", |
| "ei_keymap.h", |
| "ei_sender_session.cc", |
| "ei_sender_session.h", |
| "fd_string_reader.cc", |
| "fd_string_reader.h", |
| "fd_string_writer.cc", |
| "fd_string_writer.h", |
| "gdm_remote_display_manager.cc", |
| "gdm_remote_display_manager.h", |
| "gnome_action_executor.cc", |
| "gnome_action_executor.h", |
| "gnome_capture_stream_manager.cc", |
| "gnome_capture_stream_manager.h", |
| "gnome_desktop_display_info_monitor.cc", |
| "gnome_desktop_display_info_monitor.h", |
| "gnome_desktop_resizer.cc", |
| "gnome_desktop_resizer.h", |
| "gnome_display_config_monitor.cc", |
| "gnome_display_config_monitor.h", |
| "gnome_headless_detector.cc", |
| "gnome_headless_detector.h", |
| "gnome_interaction_strategy.cc", |
| "gnome_interaction_strategy.h", |
| "gnome_remote_desktop_session.cc", |
| "gnome_remote_desktop_session.h", |
| "input_injector_constants_linux.h", |
| "input_injector_linux.cc", |
| "input_injector_x11.cc", |
| "input_injector_x11.h", |
| "keyboard_layout_monitor_linux.cc", |
| "keyboard_layout_monitor_utils.cc", |
| "keyboard_layout_monitor_utils.h", |
| "linux_process_launcher_delegate.cc", |
| "linux_process_launcher_delegate.h", |
| "login_session_manager.cc", |
| "login_session_manager.h", |
| "login_session_server.cc", |
| "login_session_server.h", |
| "pipewire_audio_capturer.cc", |
| "pipewire_audio_capturer.h", |
| "pipewire_audio_injector.cc", |
| "pipewire_audio_injector.h", |
| "pipewire_capture_stream.cc", |
| "pipewire_capture_stream.h", |
| "pipewire_desktop_capturer.cc", |
| "pipewire_desktop_capturer.h", |
| "pipewire_local_input_monitor.cc", |
| "pipewire_local_input_monitor.h", |
| "pipewire_mouse_cursor_capturer.cc", |
| "pipewire_mouse_cursor_capturer.h", |
| "pipewire_mouse_cursor_monitor.cc", |
| "pipewire_mouse_cursor_monitor.h", |
| "pipewire_utils.cc", |
| "pipewire_utils.h", |
| "portal_capture_stream_manager.cc", |
| "portal_capture_stream_manager.h", |
| "portal_curtain_mode.cc", |
| "portal_curtain_mode.h", |
| "portal_desktop_resizer.cc", |
| "portal_desktop_resizer.h", |
| "portal_display_info_loader.cc", |
| "portal_display_info_loader.h", |
| "portal_interaction_strategy.cc", |
| "portal_interaction_strategy.h", |
| "portal_remote_desktop_session.cc", |
| "portal_remote_desktop_session.h", |
| "portal_utils.cc", |
| "portal_utils.h", |
| "pulse_audio_capturer.cc", |
| "pulse_audio_capturer.h", |
| "remote_display_session_manager.cc", |
| "remote_display_session_manager.h", |
| "remote_session_info_main.cc", |
| "scoped_portal_request.cc", |
| "scoped_portal_request.h", |
| "scoped_portal_session.cc", |
| "scoped_portal_session.h", |
| "screen_saver_inhibitor.cc", |
| "screen_saver_inhibitor.h", |
| "systemd_user_env_setter.cc", |
| "systemd_user_env_setter.h", |
| ] |
| deps = [ |
| ":gvariant", |
| ":pipewire_loader", |
| ":remote_session_info_main_headers", |
| ":utils", |
| ":x11", |
| ":x11_display_utils", |
| "//base", |
| "//build/config/linux/gtk", |
| "//components/named_mojo_ipc_server", |
| "//ipc", |
| "//remoting/base", |
| "//remoting/base:logging", |
| "//remoting/host:client_session_control", |
| "//remoting/host:clipboard", |
| "//remoting/host:common_headers", |
| "//remoting/host:display_layout", |
| "//remoting/host:ipc_constants", |
| "//remoting/host:mojo_caller_security_checker", |
| "//remoting/host:platform_interfaces", |
| "//remoting/host:signal_handler", |
| "//remoting/host/base", |
| "//remoting/host/input_monitor", |
| "//remoting/host/linux/dbus_interfaces:interface_headers", |
| "//remoting/host/mojom", |
| "//remoting/host/security_key", |
| "//remoting/proto", |
| "//remoting/protocol", |
| "//third_party/libei", |
| "//third_party/webrtc_overrides:webrtc_component", |
| "//ui/base", |
| "//ui/base/x", |
| "//ui/events:dom_keycode_converter", |
| "//ui/events/keycodes:xkb", |
| "//ui/gfx/x", |
| ] |
| libs = [ "systemd" ] |
| } |
| |
| source_set("x11_display_utils") { |
| sources = [ |
| "gnome_display_config.cc", |
| "gnome_display_config.h", |
| "gnome_display_config_dbus_client.cc", |
| "gnome_display_config_dbus_client.h", |
| "scoped_glib.cc", |
| "scoped_glib.h", |
| "x11_display_util.cc", |
| "x11_display_util.h", |
| ] |
| deps = [ |
| ":utils", |
| ":x11", |
| "//remoting/base:logging", |
| "//remoting/host:display_layout", |
| "//remoting/host/linux/dbus_interfaces:interface_headers", |
| "//third_party/webrtc_overrides:webrtc_component", |
| "//ui/base", |
| "//ui/base/x", |
| "//ui/gfx/geometry", |
| "//ui/gfx/x", |
| ] |
| } |
| |
| if (remoting_use_x11) { |
| source_set("x11") { |
| sources = [ |
| "unicode_to_keysym.cc", |
| "unicode_to_keysym.h", |
| "x11_character_injector.cc", |
| "x11_character_injector.h", |
| "x11_keyboard_impl.cc", |
| "x11_keyboard_impl.h", |
| "x11_util.cc", |
| "x11_util.h", |
| "x_server_clipboard.cc", |
| "x_server_clipboard.h", |
| ] |
| public_deps = [ "//ui/gfx/x" ] |
| deps = [ |
| "//base", |
| "//remoting/base", |
| "//remoting/base:logging", |
| "//third_party/webrtc_overrides:webrtc_component", |
| ] |
| } |
| } |
| |
| if (!is_chromeos) { |
| executable("remoting_native_messaging_host") { |
| configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| |
| sources = |
| [ "//remoting/host/setup/me2me_native_messaging_host_entry_point.cc" ] |
| |
| deps = [ |
| "//remoting/host:remoting_core", |
| "//remoting/host/setup:native_messaging_host_main_headers", |
| ] |
| } |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| |
| sources = [ |
| "audio_pipe_reader_unittest.cc", |
| "certificate_watcher_unittest.cc", |
| "fake_capture_stream.cc", |
| "fake_capture_stream.h", |
| "gdbus_connection_ref_unittest.cc", |
| "gnome_desktop_resizer_unittest.cc", |
| "gnome_display_config_dbus_client_unittest.cc", |
| "gnome_display_config_unittest.cc", |
| "gvariant_ref_unittest.cc", |
| "gvariant_type_unittest.cc", |
| "pipewire_audio_capturer_unittest.cc", |
| "pipewire_mouse_cursor_capturer_unittest.cc", |
| "test_util.cc", |
| "test_util.h", |
| "unicode_to_keysym_unittest.cc", |
| "x11_character_injector_unittest.cc", |
| "x11_display_util_unittest.cc", |
| "x_server_clipboard_unittest.cc", |
| ] |
| |
| if (!remoting_use_x11) { |
| sources -= [ |
| "unicode_to_keysym_unittest.cc", |
| "x11_character_injector_unittest.cc", |
| "x11_display_util_unittest.cc", |
| "x_server_clipboard_unittest.cc", |
| ] |
| } |
| |
| configs += [ "//remoting/build/config:version" ] |
| |
| # Needed for the dbus test service |
| configs += [ "//build/config/linux/dbus" ] |
| |
| deps = [ |
| ":platform_impls", |
| ":utils", |
| ":x11_display_utils", |
| "dbus_interfaces:interface_headers", |
| "//dbus:dbus_test_service", |
| "//remoting/host:common", |
| "//remoting/host:platform_interfaces", |
| "//remoting/host:test_support", |
| "//remoting/host/it2me:common", |
| "//remoting/host/native_messaging", |
| "//remoting/host/security_key:unit_tests", |
| "//remoting/host/setup:common", |
| "//remoting/proto", |
| "//remoting/resources", |
| "//skia", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//ui/gfx/geometry", |
| ] |
| |
| if (remoting_use_x11) { |
| deps += [ ":x11" ] |
| } |
| |
| if (!is_ios) { |
| deps += [ "//components/policy/core/browser:test_support" ] |
| } |
| } |