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 = [ |
| 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.org | 12b4efe | 2014-07-08 22:05:24 +0000 | [diff] [blame^] | 40 | "mac/full_screen_chrome_window_detector.cc", |
| 41 | "mac/full_screen_chrome_window_detector.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 42 | "mac/scoped_pixel_buffer_object.cc", |
| 43 | "mac/scoped_pixel_buffer_object.h", |
jiayl@webrtc.org | 12b4efe | 2014-07-08 22:05:24 +0000 | [diff] [blame^] | 44 | "mac/window_list_utils.cc", |
| 45 | "mac/window_list_utils.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 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 | deps = ["../../system_wrappers"] |
| 109 | |
| 110 | if (use_desktop_capture_differ_sse2) { |
| 111 | deps += [":desktop_capture_differ_sse2"] |
| 112 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 113 | } |
| 114 | |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 115 | if (use_desktop_capture_differ_sse2) { |
| 116 | # Have to be compiled as a separate target because it needs to be compiled |
| 117 | # with SSE2 enabled. |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 118 | source_set("desktop_capture_differ_sse2") { |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 119 | sources = [ |
| 120 | "differ_block_sse2.cc", |
| 121 | "differ_block_sse2.h", |
| 122 | ] |
| 123 | |
| 124 | if (is_posix && !is_mac) { |
| 125 | cflags = ["-msse2"] |
| 126 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 127 | } |
| 128 | } |