blob: 9067177165fabd5762bf97c11234c25b888983e8 [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# 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
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +00009import("//build/config/ui.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000010import("../../build/webrtc.gni")
11
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +000012use_desktop_capture_differ_sse2 =
13 (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64"))
14
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000015source_set("desktop_capture") {
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +000016 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",
jiayl@webrtc.org12b4efe2014-07-08 22:05:24 +000040 "mac/full_screen_chrome_window_detector.cc",
41 "mac/full_screen_chrome_window_detector.h",
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +000042 "mac/scoped_pixel_buffer_object.cc",
43 "mac/scoped_pixel_buffer_object.h",
jiayl@webrtc.org12b4efe2014-07-08 22:05:24 +000044 "mac/window_list_utils.cc",
45 "mac/window_list_utils.h",
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +000046 "mouse_cursor.cc",
47 "mouse_cursor.h",
48 "mouse_cursor_monitor.h",
49 "mouse_cursor_monitor_mac.mm",
50 "mouse_cursor_monitor_win.cc",
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +000051 "screen_capture_frame_queue.cc",
52 "screen_capture_frame_queue.h",
53 "screen_capturer.cc",
54 "screen_capturer.h",
55 "screen_capturer_helper.cc",
56 "screen_capturer_helper.h",
57 "screen_capturer_mac.mm",
58 "screen_capturer_win.cc",
59 "shared_desktop_frame.cc",
60 "shared_desktop_frame.h",
61 "shared_memory.cc",
62 "shared_memory.h",
63 "win/cursor.cc",
64 "win/cursor.h",
65 "win/desktop.cc",
66 "win/desktop.h",
67 "win/scoped_gdi_object.h",
68 "win/scoped_thread_desktop.cc",
69 "win/scoped_thread_desktop.h",
70 "win/screen_capturer_win_gdi.cc",
71 "win/screen_capturer_win_gdi.h",
72 "win/screen_capturer_win_magnifier.cc",
73 "win/screen_capturer_win_magnifier.h",
74 "win/screen_capture_utils.cc",
75 "win/screen_capture_utils.h",
76 "win/window_capture_utils.cc",
77 "win/window_capture_utils.h",
78 "window_capturer.cc",
79 "window_capturer.h",
80 "window_capturer_mac.mm",
81 "window_capturer_win.cc",
82 ]
83
84 if (use_x11) {
85 sources += [
86 "mouse_cursor_monitor_x11.cc",
87 "screen_capturer_x11.cc",
88 "window_capturer_x11.cc",
89 "x11/shared_x_display.h",
90 "x11/shared_x_display.cc",
91 "x11/x_error_trap.cc",
92 "x11/x_error_trap.h",
93 "x11/x_server_pixel_buffer.cc",
94 "x11/x_server_pixel_buffer.h",
95 ]
96 configs += ["//build/config/linux:x11"]
97 }
98
99 if (!is_win && !is_mac && !use_x11) {
100 sources += [
101 "mouse_cursor_monitor_null.cc",
102 "screen_capturer_null.cc",
103 "window_capturer_null.cc",
104 ]
105 }
106
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000107 configs += [ "../..:common_config" ]
108 public_configs = [ "../..:common_inherited_config"]
kjellander@webrtc.org9bef5512014-07-13 09:02:54 +0000109
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000110 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
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000116 deps = [
117 "../../system_wrappers",
118 "../../base:webrtc_base",
119 ]
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +0000120
121 if (use_desktop_capture_differ_sse2) {
122 deps += [":desktop_capture_differ_sse2"]
123 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000124}
125
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +0000126if (use_desktop_capture_differ_sse2) {
127 # Have to be compiled as a separate target because it needs to be compiled
128 # with SSE2 enabled.
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000129 source_set("desktop_capture_differ_sse2") {
brettw@chromium.org0867f692014-09-10 16:24:11 +0000130 visibility = [ ":*" ]
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +0000131 sources = [
132 "differ_block_sse2.cc",
133 "differ_block_sse2.h",
134 ]
135
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000136 configs += [ "../..:common_config" ]
137 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org9bef5512014-07-13 09:02:54 +0000138
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +0000139 if (is_posix && !is_mac) {
140 cflags = ["-msse2"]
141 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000142 }
143}