Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / desktop_capture / BUILD.gn
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
9 import("//build/config/ui.gni")
10 import("../../build/webrtc.gni")
11
12 use_desktop_capture_differ_sse2 =
13     (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64"))
14
15 source_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     "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
107   configs += [ "../..:common_config" ]
108   public_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
126 if (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_config" ]
137     public_configs = [ "../..:common_inherited_config" ]
138
139     if (is_posix && !is_mac) {
140       cflags = ["-msse2"]
141     }
142   }
143 }