naiveproxy/remoting/host/linux/BUILD.gn
2018-12-09 21:59:24 -05:00

192 lines
4.4 KiB
Plaintext

# Copyright 2016 The Chromium Authors. All rights reserved.
# 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("//remoting/build/config/remoting_build.gni")
group("all_tests") {
testonly = true
}
if (enable_me2me_host) {
executable("remoting_user_session") {
sources = [
"remoting_user_session.cc",
]
deps = [
"//base",
]
libs = [ "pam" ]
}
copy("remoting_me2me_host_copy_script") {
sources = [
"linux_me2me_host.py",
]
outputs = [
"$root_build_dir/remoting/chrome-remote-desktop",
]
}
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_user_session_wrapper") {
sources = [
"remoting_user_session_wrapper.sh",
]
outputs = [
"$root_build_dir/remoting/user-session",
]
}
copy("remoting_me2me_host_copy_user_session") {
sources = [
"$root_build_dir/remoting_user_session",
]
outputs = [
"$root_build_dir/remoting/{{source_file_part}}",
]
deps = [
":remoting_user_session",
]
if (is_component_build) {
sources += [ "$root_build_dir/libbase.so" ]
deps += [ "//base:base" ]
if (use_custom_libcxx) {
sources += [ "$root_build_dir/libc++.so" ]
deps += [ "//buildtools/third_party/libc++" ]
}
}
}
group("remoting_dev_me2me_host") {
deps = [
":remoting_me2me_host_copy_host_wrapper",
":remoting_me2me_host_copy_script",
":remoting_me2me_host_copy_user_session",
":remoting_me2me_host_copy_user_session_wrapper",
":remoting_native_messaging_host",
"//remoting/host:remoting_me2me_host",
]
}
}
source_set("linux") {
sources = [
"audio_pipe_reader.cc",
"audio_pipe_reader.h",
"certificate_watcher.cc",
"certificate_watcher.h",
]
deps = [
"//remoting/protocol",
"//third_party/webrtc/modules/desktop_capture",
]
public_deps = []
if (use_x11) {
deps += [ ":x11" ]
}
if (is_desktop_linux) {
deps += [ "//build/config/linux/gtk" ]
}
}
if (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",
]
deps = [
"//third_party/webrtc/modules/desktop_capture",
]
}
}
executable("remoting_native_messaging_host") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]
sources = [
"//remoting/host/setup/me2me_native_messaging_host_entry_point.cc",
"//remoting/host/setup/me2me_native_messaging_host_main.cc",
"//remoting/host/setup/me2me_native_messaging_host_main.h",
]
deps = [
"//base",
"//net",
"//remoting/base:breakpad",
"//remoting/host",
"//remoting/host:remoting_infoplist_strings",
"//remoting/host/native_messaging",
"//remoting/host/setup",
"//services/network/public/mojom",
]
# The |major|, |build| and |patch| versions are inherited from Chrome.
# Since Chrome's |minor| version is always '0', we replace it with a
# Chromoting-specific patch version.
defines =
[ "VERSION=" + "$chrome_version_major" + "." + "$remoting_version_patch" +
"." + "$chrome_version_build" + "." + "$chrome_version_patch" ]
}
source_set("unit_tests") {
testonly = true
sources = [
"audio_pipe_reader_unittest.cc",
"certificate_watcher_unittest.cc",
"unicode_to_keysym_unittest.cc",
"x11_character_injector_unittest.cc",
"x_server_clipboard_unittest.cc",
]
if (!use_x11) {
sources -= [
"unicode_to_keysym_unittest.cc",
"x_server_clipboard_unittest.cc",
]
}
configs += [ "//remoting/build/config:version" ]
deps = [
"//remoting/host",
"//remoting/host:test_support",
"//remoting/host/it2me:common",
"//remoting/host/native_messaging",
"//remoting/host/security_key:unit_tests",
"//remoting/host/setup",
"//remoting/proto",
"//remoting/resources",
"//skia",
"//testing/gmock",
"//testing/gtest",
]
if (!is_ios) {
deps += [ "//components/policy/core/browser:test_support" ]
}
}