Remove dependency on content from remoting_host.
[chromium-blink-merge.git] / remoting / host / BUILD.gn
blob12c6bd05e8e26a29063928d65bded17015f9d0b4
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//remoting/remoting_version.gni")
9 static_library("host") {
10   gypi_values = exec_script("//build/gypi_to_gn.py",
11                             [ rebase_path("../remoting_host_srcs.gypi") ],
12                             "scope",
13                             [ "../remoting_host_srcs.gypi" ])
15   sources = rebase_path(gypi_values.remoting_host_sources, ".", "//remoting")
17   libs = []
19   configs += [ "//build/config/compiler:wexit_time_destructors" ]
21   defines = [ "WEBRTC_CHROMIUM_BUILD" ]
23   deps = [
24     "//base:i18n",
25     "//components/policy:policy",
26     "//components/policy:policy_component_common",
27     "//crypto",
28     "//google_apis",
29     "//ipc",
30     "//remoting/base",
31     "//remoting/protocol",
32     "//remoting/resources",
33     "//ui/events/platform",
34     "//ui/events:dom4_keycode_converter",
35   ]
37   if (is_linux) {
38     libs += [ "pam" ]
39   }
41   if (use_x11) {
42     configs += [
43       #TODO : (kelvinp) Add GTK to the configs.
44       "//build/config/linux:x11",
45     ]
46   } else {
47     sources -= [
48       "clipboard_x11.cc",
49       "linux/x_server_clipboard.cc",
50       "linux/x_server_clipboard.h",
51     ]
52   }
54   if (is_chromeos) {
55     deps += [
56       "//cc",
57       "//ppapi/host",
58       "//skia",
59       "//ui/aura",
60       "//ui/compositor",
61       "//ui/events",
62       "//ui/views",
63     ]
65     if (use_ash) {
66       deps += [ "//ash" ]
67     }
69     if (use_ozone) {
70       sources -= [ "input_injector_x11.cc" ]
71       deps += [ "//ui/ozone" ]
72     } else {
73       sources -= [
74         "clipboard_x11.cc",
75         "input_injector_chromeos.cc",
76         "input_injector_chromeos.h",
77         "linux/x_server_clipboard.cc",
78         "linux/x_server_clipboard.h",
79       ]
80     }
82     sources -= [
83       "continue_window_linux.cc",
84       "disconnect_window_linux.cc",
85       "local_input_monitor_x11.cc",
86       "remoting_me2me_host.cc",
87     ]
88   }
90   if (is_mac) {
91     defines += [
92       "HOST_BUNDLE_NAME=\"$host_bundle_name\"",
93       "PREFPANE_BUNDLE_NAME=\"$prefpane_bundle_name\"",
94     ]
96     libs += [
97       "Accelerate.framework",
98       "libpam.a",
99     ]
101     deps += [ "//google_toolbox_for_mac" ]
102   }
104   if (enable_webrtc) {
105     deps += [
106       "//third_party/libjingle:libpeerconnection",
107       "//third_party/webrtc/modules/desktop_capture",
108     ]
110     sources += rebase_path(gypi_values.remoting_cast_sources, ".", "//remoting")
111   }