• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS.  All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("//build/config/ui.gni")
10import("../../build/webrtc.gni")
11
12use_desktop_capture_differ_sse2 =
13    (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64"))
14
15source_set("desktop_capture") {
16  sources = [
17    "desktop_and_cursor_composer.cc",
18    "desktop_and_cursor_composer.h",
19    "desktop_capture_types.h",
20    "desktop_capturer.h",
21    "desktop_frame.cc",
22    "desktop_frame.h",
23    "desktop_frame_win.cc",
24    "desktop_frame_win.h",
25    "desktop_geometry.cc",
26    "desktop_geometry.h",
27    "desktop_capture_options.h",
28    "desktop_capture_options.cc",
29    "desktop_capturer.h",
30    "desktop_region.cc",
31    "desktop_region.h",
32    "differ.cc",
33    "differ.h",
34    "differ_block.cc",
35    "differ_block.h",
36    "mac/desktop_configuration.h",
37    "mac/desktop_configuration.mm",
38    "mac/desktop_configuration_monitor.h",
39    "mac/desktop_configuration_monitor.cc",
40    "mac/full_screen_chrome_window_detector.cc",
41    "mac/full_screen_chrome_window_detector.h",
42    "mac/scoped_pixel_buffer_object.cc",
43    "mac/scoped_pixel_buffer_object.h",
44    "mac/window_list_utils.cc",
45    "mac/window_list_utils.h",
46    "mouse_cursor.cc",
47    "mouse_cursor.h",
48    "mouse_cursor_monitor.h",
49    "mouse_cursor_monitor_mac.mm",
50    "mouse_cursor_monitor_win.cc",
51    "mouse_cursor_shape.h",
52    "screen_capture_frame_queue.cc",
53    "screen_capture_frame_queue.h",
54    "screen_capturer.cc",
55    "screen_capturer.h",
56    "screen_capturer_helper.cc",
57    "screen_capturer_helper.h",
58    "screen_capturer_mac.mm",
59    "screen_capturer_win.cc",
60    "shared_desktop_frame.cc",
61    "shared_desktop_frame.h",
62    "shared_memory.cc",
63    "shared_memory.h",
64    "win/cursor.cc",
65    "win/cursor.h",
66    "win/desktop.cc",
67    "win/desktop.h",
68    "win/scoped_gdi_object.h",
69    "win/scoped_thread_desktop.cc",
70    "win/scoped_thread_desktop.h",
71    "win/screen_capturer_win_gdi.cc",
72    "win/screen_capturer_win_gdi.h",
73    "win/screen_capturer_win_magnifier.cc",
74    "win/screen_capturer_win_magnifier.h",
75    "win/screen_capture_utils.cc",
76    "win/screen_capture_utils.h",
77    "win/window_capture_utils.cc",
78    "win/window_capture_utils.h",
79    "window_capturer.cc",
80    "window_capturer.h",
81    "window_capturer_mac.mm",
82    "window_capturer_win.cc",
83  ]
84
85  if (use_x11) {
86    sources += [
87      "mouse_cursor_monitor_x11.cc",
88      "screen_capturer_x11.cc",
89      "window_capturer_x11.cc",
90      "x11/shared_x_display.h",
91      "x11/shared_x_display.cc",
92      "x11/x_error_trap.cc",
93      "x11/x_error_trap.h",
94      "x11/x_server_pixel_buffer.cc",
95      "x11/x_server_pixel_buffer.h",
96    ]
97    configs += ["//build/config/linux:x11"]
98  }
99
100  if (!is_win && !is_mac && !use_x11) {
101    sources += [
102      "mouse_cursor_monitor_null.cc",
103      "screen_capturer_null.cc",
104      "window_capturer_null.cc",
105    ]
106  }
107
108  direct_dependent_configs = [ "../..:common_inherited_config"]
109
110  if (is_clang) {
111    # Suppress warnings from Chrome's Clang plugins.
112    # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
113    configs -= [ "//build/config/clang:find_bad_constructs" ]
114  }
115
116  deps = [
117    "../../system_wrappers",
118    "../../base:webrtc_base",
119  ]
120
121  if (use_desktop_capture_differ_sse2) {
122    deps += [":desktop_capture_differ_sse2"]
123  }
124}
125
126if (use_desktop_capture_differ_sse2) {
127  # Have to be compiled as a separate target because it needs to be compiled
128  # with SSE2 enabled.
129  source_set("desktop_capture_differ_sse2") {
130    visibility = [ ":*" ]
131    sources = [
132      "differ_block_sse2.cc",
133      "differ_block_sse2.h",
134    ]
135
136    configs += [ "../..:common_inherited_config"]
137
138    if (is_posix && !is_mac) {
139      cflags = ["-msse2"]
140    }
141  }
142}
143