kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 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 | |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 9 | import("//build/config/ui.gni") |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 10 | import("../../build/webrtc.gni") |
| 11 | |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 12 | use_desktop_capture_differ_sse2 = |
| 13 | (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64")) |
| 14 | |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 15 | source_set("desktop_capture") { |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 16 | sources = [ |
jiayl@webrtc.org | 0e71070 | 2014-11-11 18:15:55 +0000 | [diff] [blame^] | 17 | "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.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 22 | "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.org | 12b4efe | 2014-07-08 22:05:24 +0000 | [diff] [blame] | 45 | "mac/full_screen_chrome_window_detector.cc", |
| 46 | "mac/full_screen_chrome_window_detector.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 47 | "mac/scoped_pixel_buffer_object.cc", |
| 48 | "mac/scoped_pixel_buffer_object.h", |
jiayl@webrtc.org | 12b4efe | 2014-07-08 22:05:24 +0000 | [diff] [blame] | 49 | "mac/window_list_utils.cc", |
| 50 | "mac/window_list_utils.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 51 | "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.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 56 | "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.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 112 | configs += [ "../..:common_config" ] |
| 113 | public_configs = [ "../..:common_inherited_config"] |
kjellander@webrtc.org | 9bef551 | 2014-07-13 09:02:54 +0000 | [diff] [blame] | 114 | |
kjellander@webrtc.org | 42ee5b5 | 2014-08-25 14:15:35 +0000 | [diff] [blame] | 115 | 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.org | 6ae5a6d | 2014-09-16 01:03:29 +0000 | [diff] [blame] | 121 | deps = [ |
| 122 | "../../system_wrappers", |
| 123 | "../../base:webrtc_base", |
| 124 | ] |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 125 | |
| 126 | if (use_desktop_capture_differ_sse2) { |
| 127 | deps += [":desktop_capture_differ_sse2"] |
| 128 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 129 | } |
| 130 | |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 131 | if (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.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 134 | source_set("desktop_capture_differ_sse2") { |
brettw@chromium.org | 0867f69 | 2014-09-10 16:24:11 +0000 | [diff] [blame] | 135 | visibility = [ ":*" ] |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 136 | sources = [ |
| 137 | "differ_block_sse2.cc", |
| 138 | "differ_block_sse2.h", |
| 139 | ] |
| 140 | |
kjellander@webrtc.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 141 | configs += [ "../..:common_config" ] |
| 142 | public_configs = [ "../..:common_inherited_config" ] |
kjellander@webrtc.org | 9bef551 | 2014-07-13 09:02:54 +0000 | [diff] [blame] | 143 | |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 144 | if (is_posix && !is_mac) { |
| 145 | cflags = ["-msse2"] |
| 146 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 147 | } |
| 148 | } |