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 = |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 13 | !is_ios && (current_cpu == "x86" || current_cpu == "x64") |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 14 | |
Sergey Ulanov | 098c1de | 2015-09-01 11:36:40 -0700 | [diff] [blame^] | 15 | source_set("primitives") { |
| 16 | sources = [ |
| 17 | "desktop_capture_types.h", |
| 18 | "desktop_frame.cc", |
| 19 | "desktop_frame.h", |
| 20 | "desktop_geometry.cc", |
| 21 | "desktop_geometry.h", |
| 22 | "desktop_region.cc", |
| 23 | "desktop_region.h", |
| 24 | ] |
| 25 | |
| 26 | public_configs = [ "../..:common_inherited_config" ] |
| 27 | } |
| 28 | |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 29 | source_set("desktop_capture") { |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 30 | sources = [ |
jiayl@webrtc.org | 0e71070 | 2014-11-11 18:15:55 +0000 | [diff] [blame] | 31 | "cropped_desktop_frame.cc", |
| 32 | "cropped_desktop_frame.h", |
| 33 | "cropping_window_capturer.cc", |
| 34 | "cropping_window_capturer.h", |
| 35 | "cropping_window_capturer_win.cc", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 36 | "desktop_and_cursor_composer.cc", |
| 37 | "desktop_and_cursor_composer.h", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 38 | "desktop_capture_options.cc", |
| 39 | "desktop_capture_options.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 40 | "desktop_capturer.h", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 41 | "desktop_capturer.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 42 | "desktop_frame_win.cc", |
| 43 | "desktop_frame_win.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 44 | "differ.cc", |
| 45 | "differ.h", |
| 46 | "differ_block.cc", |
| 47 | "differ_block.h", |
| 48 | "mac/desktop_configuration.h", |
| 49 | "mac/desktop_configuration.mm", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 50 | "mac/desktop_configuration_monitor.cc", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 51 | "mac/desktop_configuration_monitor.h", |
jiayl@webrtc.org | 12b4efe | 2014-07-08 22:05:24 +0000 | [diff] [blame] | 52 | "mac/full_screen_chrome_window_detector.cc", |
| 53 | "mac/full_screen_chrome_window_detector.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 54 | "mac/scoped_pixel_buffer_object.cc", |
| 55 | "mac/scoped_pixel_buffer_object.h", |
jiayl@webrtc.org | 12b4efe | 2014-07-08 22:05:24 +0000 | [diff] [blame] | 56 | "mac/window_list_utils.cc", |
| 57 | "mac/window_list_utils.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 58 | "mouse_cursor.cc", |
| 59 | "mouse_cursor.h", |
| 60 | "mouse_cursor_monitor.h", |
| 61 | "mouse_cursor_monitor_mac.mm", |
| 62 | "mouse_cursor_monitor_win.cc", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 63 | "screen_capture_frame_queue.cc", |
| 64 | "screen_capture_frame_queue.h", |
| 65 | "screen_capturer.cc", |
| 66 | "screen_capturer.h", |
| 67 | "screen_capturer_helper.cc", |
| 68 | "screen_capturer_helper.h", |
| 69 | "screen_capturer_mac.mm", |
| 70 | "screen_capturer_win.cc", |
| 71 | "shared_desktop_frame.cc", |
| 72 | "shared_desktop_frame.h", |
| 73 | "shared_memory.cc", |
| 74 | "shared_memory.h", |
| 75 | "win/cursor.cc", |
| 76 | "win/cursor.h", |
| 77 | "win/desktop.cc", |
| 78 | "win/desktop.h", |
| 79 | "win/scoped_gdi_object.h", |
| 80 | "win/scoped_thread_desktop.cc", |
| 81 | "win/scoped_thread_desktop.h", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 82 | "win/screen_capture_utils.cc", |
| 83 | "win/screen_capture_utils.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 84 | "win/screen_capturer_win_gdi.cc", |
| 85 | "win/screen_capturer_win_gdi.h", |
| 86 | "win/screen_capturer_win_magnifier.cc", |
| 87 | "win/screen_capturer_win_magnifier.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 88 | "win/window_capture_utils.cc", |
| 89 | "win/window_capture_utils.h", |
| 90 | "window_capturer.cc", |
| 91 | "window_capturer.h", |
| 92 | "window_capturer_mac.mm", |
| 93 | "window_capturer_win.cc", |
| 94 | ] |
| 95 | |
| 96 | if (use_x11) { |
| 97 | sources += [ |
| 98 | "mouse_cursor_monitor_x11.cc", |
| 99 | "screen_capturer_x11.cc", |
| 100 | "window_capturer_x11.cc", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 101 | "x11/shared_x_display.cc", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 102 | "x11/shared_x_display.h", |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 103 | "x11/x_error_trap.cc", |
| 104 | "x11/x_error_trap.h", |
| 105 | "x11/x_server_pixel_buffer.cc", |
| 106 | "x11/x_server_pixel_buffer.h", |
| 107 | ] |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 108 | configs += [ "//build/config/linux:x11" ] |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 109 | } |
| 110 | |
| 111 | if (!is_win && !is_mac && !use_x11) { |
| 112 | sources += [ |
| 113 | "mouse_cursor_monitor_null.cc", |
| 114 | "screen_capturer_null.cc", |
| 115 | "window_capturer_null.cc", |
| 116 | ] |
| 117 | } |
| 118 | |
kjellander@webrtc.org | 556caff | 2014-12-19 13:28:37 +0000 | [diff] [blame] | 119 | if (is_mac) { |
| 120 | libs = [ |
| 121 | "AppKit.framework", |
| 122 | "IOKit.framework", |
| 123 | "OpenGL.framework", |
| 124 | ] |
| 125 | } |
| 126 | |
kjellander@webrtc.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 127 | configs += [ "../..:common_config" ] |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 128 | public_configs = [ "../..:common_inherited_config" ] |
kjellander@webrtc.org | 9bef551 | 2014-07-13 09:02:54 +0000 | [diff] [blame] | 129 | |
kjellander@webrtc.org | 42ee5b5 | 2014-08-25 14:15:35 +0000 | [diff] [blame] | 130 | if (is_clang) { |
| 131 | # Suppress warnings from Chrome's Clang plugins. |
| 132 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 133 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 134 | } |
| 135 | |
andrew@webrtc.org | 6ae5a6d | 2014-09-16 01:03:29 +0000 | [diff] [blame] | 136 | deps = [ |
Sergey Ulanov | 098c1de | 2015-09-01 11:36:40 -0700 | [diff] [blame^] | 137 | ":primitives", |
kjellander@webrtc.org | c429b82 | 2015-01-21 20:22:33 +0000 | [diff] [blame] | 138 | "../../base:rtc_base_approved", |
andrew@webrtc.org | 6ae5a6d | 2014-09-16 01:03:29 +0000 | [diff] [blame] | 139 | "../../system_wrappers", |
andrew@webrtc.org | 6ae5a6d | 2014-09-16 01:03:29 +0000 | [diff] [blame] | 140 | ] |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 141 | |
| 142 | if (use_desktop_capture_differ_sse2) { |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 143 | deps += [ ":desktop_capture_differ_sse2" ] |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 144 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 145 | } |
| 146 | |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 147 | if (use_desktop_capture_differ_sse2) { |
| 148 | # Have to be compiled as a separate target because it needs to be compiled |
| 149 | # with SSE2 enabled. |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 150 | source_set("desktop_capture_differ_sse2") { |
brettw@chromium.org | 0867f69 | 2014-09-10 16:24:11 +0000 | [diff] [blame] | 151 | visibility = [ ":*" ] |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 152 | sources = [ |
| 153 | "differ_block_sse2.cc", |
| 154 | "differ_block_sse2.h", |
| 155 | ] |
| 156 | |
kjellander@webrtc.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 157 | configs += [ "../..:common_config" ] |
| 158 | public_configs = [ "../..:common_inherited_config" ] |
kjellander@webrtc.org | 9bef551 | 2014-07-13 09:02:54 +0000 | [diff] [blame] | 159 | |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 160 | if (is_posix && !is_mac) { |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 161 | cflags = [ "-msse2" ] |
jiayl@webrtc.org | 93426cd | 2014-07-02 15:47:12 +0000 | [diff] [blame] | 162 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 163 | } |
| 164 | } |