blob: 6c8d9e200cfb1ec885550c6fda958f7c298820b7 [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 = [
jiayl@webrtc.org0e710702014-11-11 18:15:55 +000017 "cropped_desktop_frame.cc",
18 "cropped_desktop_frame.h",
19 "cropping_window_capturer.cc",
20 "cropping_window_capturer.h",
21 "cropping_window_capturer_win.cc",
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +000022 "desktop_and_cursor_composer.cc",
23 "desktop_and_cursor_composer.h",
24 "desktop_capture_types.h",
25 "desktop_capturer.h",
26 "desktop_frame.cc",
27 "desktop_frame.h",
28 "desktop_frame_win.cc",
29 "desktop_frame_win.h",
30 "desktop_geometry.cc",
31 "desktop_geometry.h",
32 "desktop_capture_options.h",
33 "desktop_capture_options.cc",
34 "desktop_capturer.h",
35 "desktop_region.cc",
36 "desktop_region.h",
37 "differ.cc",
38 "differ.h",
39 "differ_block.cc",
40 "differ_block.h",
41 "mac/desktop_configuration.h",
42 "mac/desktop_configuration.mm",
43 "mac/desktop_configuration_monitor.h",
44 "mac/desktop_configuration_monitor.cc",
jiayl@webrtc.org12b4efe2014-07-08 22:05:24 +000045 "mac/full_screen_chrome_window_detector.cc",
46 "mac/full_screen_chrome_window_detector.h",
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +000047 "mac/scoped_pixel_buffer_object.cc",
48 "mac/scoped_pixel_buffer_object.h",
jiayl@webrtc.org12b4efe2014-07-08 22:05:24 +000049 "mac/window_list_utils.cc",
50 "mac/window_list_utils.h",
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +000051 "mouse_cursor.cc",
52 "mouse_cursor.h",
53 "mouse_cursor_monitor.h",
54 "mouse_cursor_monitor_mac.mm",
55 "mouse_cursor_monitor_win.cc",
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +000056 "screen_capture_frame_queue.cc",
57 "screen_capture_frame_queue.h",
58 "screen_capturer.cc",
59 "screen_capturer.h",
60 "screen_capturer_helper.cc",
61 "screen_capturer_helper.h",
62 "screen_capturer_mac.mm",
63 "screen_capturer_win.cc",
64 "shared_desktop_frame.cc",
65 "shared_desktop_frame.h",
66 "shared_memory.cc",
67 "shared_memory.h",
68 "win/cursor.cc",
69 "win/cursor.h",
70 "win/desktop.cc",
71 "win/desktop.h",
72 "win/scoped_gdi_object.h",
73 "win/scoped_thread_desktop.cc",
74 "win/scoped_thread_desktop.h",
75 "win/screen_capturer_win_gdi.cc",
76 "win/screen_capturer_win_gdi.h",
77 "win/screen_capturer_win_magnifier.cc",
78 "win/screen_capturer_win_magnifier.h",
79 "win/screen_capture_utils.cc",
80 "win/screen_capture_utils.h",
81 "win/window_capture_utils.cc",
82 "win/window_capture_utils.h",
83 "window_capturer.cc",
84 "window_capturer.h",
85 "window_capturer_mac.mm",
86 "window_capturer_win.cc",
87 ]
88
89 if (use_x11) {
90 sources += [
91 "mouse_cursor_monitor_x11.cc",
92 "screen_capturer_x11.cc",
93 "window_capturer_x11.cc",
94 "x11/shared_x_display.h",
95 "x11/shared_x_display.cc",
96 "x11/x_error_trap.cc",
97 "x11/x_error_trap.h",
98 "x11/x_server_pixel_buffer.cc",
99 "x11/x_server_pixel_buffer.h",
100 ]
101 configs += ["//build/config/linux:x11"]
102 }
103
104 if (!is_win && !is_mac && !use_x11) {
105 sources += [
106 "mouse_cursor_monitor_null.cc",
107 "screen_capturer_null.cc",
108 "window_capturer_null.cc",
109 ]
110 }
111
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000112 configs += [ "../..:common_config" ]
113 public_configs = [ "../..:common_inherited_config"]
kjellander@webrtc.org9bef5512014-07-13 09:02:54 +0000114
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000115 if (is_clang) {
116 # Suppress warnings from Chrome's Clang plugins.
117 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
118 configs -= [ "//build/config/clang:find_bad_constructs" ]
119 }
120
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000121 deps = [
122 "../../system_wrappers",
123 "../../base:webrtc_base",
124 ]
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +0000125
126 if (use_desktop_capture_differ_sse2) {
127 deps += [":desktop_capture_differ_sse2"]
128 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000129}
130
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +0000131if (use_desktop_capture_differ_sse2) {
132 # Have to be compiled as a separate target because it needs to be compiled
133 # with SSE2 enabled.
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000134 source_set("desktop_capture_differ_sse2") {
brettw@chromium.org0867f692014-09-10 16:24:11 +0000135 visibility = [ ":*" ]
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +0000136 sources = [
137 "differ_block_sse2.cc",
138 "differ_block_sse2.h",
139 ]
140
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000141 configs += [ "../..:common_config" ]
142 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org9bef5512014-07-13 09:02:54 +0000143
jiayl@webrtc.org93426cd2014-07-02 15:47:12 +0000144 if (is_posix && !is_mac) {
145 cflags = ["-msse2"]
146 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000147 }
148}