xians@google.com | d3185fe | 2011-09-12 12:24:39 +0000 | [diff] [blame] | 1 | # Copyright (c) 2011 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. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 8 | |
| 9 | { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 10 | 'targets': [ |
| 11 | { |
| 12 | 'target_name': 'video_render_module', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 13 | 'type': 'static_library', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 14 | 'dependencies': [ |
xians@google.com | d3185fe | 2011-09-12 12:24:39 +0000 | [diff] [blame] | 15 | 'webrtc_utility', |
andrew@webrtc.org | fa418ac | 2012-09-11 01:34:21 +0000 | [diff] [blame] | 16 | '<(webrtc_root)/common_video/common_video.gyp:common_video', |
xians@google.com | d3185fe | 2011-09-12 12:24:39 +0000 | [diff] [blame] | 17 | '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 18 | ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 19 | 'sources': [ |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 20 | 'android/video_render_android_impl.cc', |
leozwang@webrtc.org | ac9fd8a | 2012-03-19 21:09:42 +0000 | [diff] [blame] | 21 | 'android/video_render_android_impl.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 22 | 'android/video_render_android_native_opengl2.cc', |
leozwang@webrtc.org | ac9fd8a | 2012-03-19 21:09:42 +0000 | [diff] [blame] | 23 | 'android/video_render_android_native_opengl2.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 24 | 'android/video_render_android_surface_view.cc', |
leozwang@webrtc.org | ac9fd8a | 2012-03-19 21:09:42 +0000 | [diff] [blame] | 25 | 'android/video_render_android_surface_view.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 26 | 'android/video_render_opengles20.cc', |
leozwang@webrtc.org | ac9fd8a | 2012-03-19 21:09:42 +0000 | [diff] [blame] | 27 | 'android/video_render_opengles20.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 28 | 'external/video_render_external_impl.cc', |
| 29 | 'external/video_render_external_impl.h', |
| 30 | 'i_video_render.h', |
| 31 | 'include/video_render.h', |
| 32 | 'include/video_render_defines.h', |
| 33 | 'incoming_video_stream.cc', |
| 34 | 'incoming_video_stream.h', |
fischman@webrtc.org | 36cf4d2 | 2013-09-12 17:39:53 +0000 | [diff] [blame] | 35 | 'ios/open_gles20.h', |
| 36 | 'ios/open_gles20.mm', |
| 37 | 'ios/video_render_ios_channel.h', |
| 38 | 'ios/video_render_ios_channel.mm', |
| 39 | 'ios/video_render_ios_gles20.h', |
| 40 | 'ios/video_render_ios_gles20.mm', |
| 41 | 'ios/video_render_ios_impl.h', |
| 42 | 'ios/video_render_ios_impl.mm', |
| 43 | 'ios/video_render_ios_view.h', |
| 44 | 'ios/video_render_ios_view.mm', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 45 | 'linux/video_render_linux_impl.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 46 | 'linux/video_render_linux_impl.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 47 | 'linux/video_x11_channel.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 48 | 'linux/video_x11_channel.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 49 | 'linux/video_x11_render.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 50 | 'linux/video_x11_render.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 51 | 'mac/cocoa_full_screen_window.mm', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 52 | 'mac/cocoa_full_screen_window.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 53 | 'mac/cocoa_render_view.mm', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 54 | 'mac/cocoa_render_view.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 55 | 'mac/video_render_agl.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 56 | 'mac/video_render_agl.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 57 | 'mac/video_render_mac_carbon_impl.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 58 | 'mac/video_render_mac_carbon_impl.h', |
| 59 | 'mac/video_render_mac_cocoa_impl.h', |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 60 | 'mac/video_render_mac_cocoa_impl.mm', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 61 | 'mac/video_render_nsopengl.h', |
| 62 | 'mac/video_render_nsopengl.mm', |
| 63 | 'video_render_frames.cc', |
| 64 | 'video_render_frames.h', |
| 65 | 'video_render_impl.cc', |
| 66 | 'video_render_impl.h', |
| 67 | 'windows/i_video_render_win.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 68 | 'windows/video_render_direct3d9.cc', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 69 | 'windows/video_render_direct3d9.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 70 | 'windows/video_render_windows_impl.cc', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 71 | 'windows/video_render_windows_impl.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 72 | ], |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 73 | # TODO(andrew): with the proper suffix, these files will be excluded |
| 74 | # automatically. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 75 | 'conditions': [ |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 76 | ['include_internal_video_render==1', { |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 77 | 'defines': ['WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',], |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 78 | }], |
leozwang@webrtc.org | 66487e1 | 2012-03-05 19:34:06 +0000 | [diff] [blame] | 79 | ['OS!="android" or include_internal_video_render==0', { |
| 80 | 'sources!': [ |
leozwang@webrtc.org | ac9fd8a | 2012-03-19 21:09:42 +0000 | [diff] [blame] | 81 | 'android/video_render_android_impl.h', |
| 82 | 'android/video_render_android_native_opengl2.h', |
| 83 | 'android/video_render_android_surface_view.h', |
| 84 | 'android/video_render_opengles20.h', |
| 85 | 'android/video_render_android_impl.cc', |
| 86 | 'android/video_render_android_native_opengl2.cc', |
| 87 | 'android/video_render_android_surface_view.cc', |
| 88 | 'android/video_render_opengles20.cc', |
leozwang@webrtc.org | 66487e1 | 2012-03-05 19:34:06 +0000 | [diff] [blame] | 89 | ], |
| 90 | }], |
fischman@webrtc.org | 36cf4d2 | 2013-09-12 17:39:53 +0000 | [diff] [blame] | 91 | ['OS!="ios" or include_internal_video_render==0', { |
| 92 | 'sources!': [ |
| 93 | # iOS |
| 94 | 'ios/open_gles20.h', |
| 95 | 'ios/open_gles20.mm', |
| 96 | 'ios/video_render_ios_channel.h', |
| 97 | 'ios/video_render_ios_channel.mm', |
| 98 | 'ios/video_render_ios_gles20.h', |
| 99 | 'ios/video_render_ios_gles20.mm', |
| 100 | 'ios/video_render_ios_impl.h', |
| 101 | 'ios/video_render_ios_impl.mm', |
| 102 | 'ios/video_render_ios_view.h', |
| 103 | 'ios/video_render_ios_view.mm', |
| 104 | ], |
| 105 | }], |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 106 | ['OS!="linux" or include_internal_video_render==0', { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 107 | 'sources!': [ |
| 108 | 'linux/video_render_linux_impl.h', |
| 109 | 'linux/video_x11_channel.h', |
| 110 | 'linux/video_x11_render.h', |
| 111 | 'linux/video_render_linux_impl.cc', |
| 112 | 'linux/video_x11_channel.cc', |
| 113 | 'linux/video_x11_render.cc', |
| 114 | ], |
| 115 | }], |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 116 | ['OS!="mac" or include_internal_video_render==0', { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 117 | 'sources!': [ |
| 118 | 'mac/cocoa_full_screen_window.h', |
| 119 | 'mac/cocoa_render_view.h', |
| 120 | 'mac/video_render_agl.h', |
| 121 | 'mac/video_render_mac_carbon_impl.h', |
| 122 | 'mac/video_render_mac_cocoa_impl.h', |
| 123 | 'mac/video_render_nsopengl.h', |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 124 | 'mac/video_render_nsopengl.mm', |
| 125 | 'mac/video_render_mac_cocoa_impl.mm', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 126 | 'mac/video_render_agl.cc', |
| 127 | 'mac/video_render_mac_carbon_impl.cc', |
| 128 | 'mac/cocoa_render_view.mm', |
| 129 | 'mac/cocoa_full_screen_window.mm', |
| 130 | ], |
| 131 | }], |
fischman@webrtc.org | 36cf4d2 | 2013-09-12 17:39:53 +0000 | [diff] [blame] | 132 | ['OS=="ios"', { |
| 133 | 'all_dependent_settings': { |
| 134 | 'xcode_settings': { |
| 135 | 'OTHER_LDFLAGS': [ |
| 136 | '-framework OpenGLES', |
| 137 | '-framework QuartzCore', |
| 138 | '-framework UIKit', |
| 139 | ], |
| 140 | }, |
| 141 | }, |
| 142 | }], |
tommi@webrtc.org | d2c3bed | 2013-02-18 14:53:04 +0000 | [diff] [blame] | 143 | ['OS=="win" and include_internal_video_render==1', { |
| 144 | 'variables': { |
| 145 | # 'directx_sdk_path' will be overridden in the condition block |
| 146 | # below, but it must not be declared as empty here since gyp |
| 147 | # will check if the first character is '/' for some reason. |
| 148 | # If it's empty, we'll get an out-of-bounds error. |
| 149 | 'directx_sdk_path': 'will_be_overridden', |
| 150 | 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files', |
| 151 | 'conditions': [ |
| 152 | ['"<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', { |
| 153 | 'directx_sdk_path': '<(DEPTH)/third_party/directxsdk/files', |
| 154 | }, { |
| 155 | 'directx_sdk_path': '$(DXSDK_DIR)', |
| 156 | }], |
| 157 | ], |
| 158 | }, |
| 159 | |
kjellander@webrtc.org | 6ba79a8 | 2012-11-23 09:41:42 +0000 | [diff] [blame] | 160 | 'include_dirs': [ |
| 161 | '<(directx_sdk_path)/Include', |
| 162 | ], |
| 163 | }], |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 164 | ['OS!="win" or include_internal_video_render==0', { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 165 | 'sources!': [ |
| 166 | 'windows/i_video_render_win.h', |
| 167 | 'windows/video_render_direct3d9.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 168 | 'windows/video_render_windows_impl.h', |
| 169 | 'windows/video_render_direct3d9.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 170 | 'windows/video_render_windows_impl.cc', |
| 171 | ], |
| 172 | }], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 173 | ] # conditions |
| 174 | }, # video_render_module |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 175 | ], # targets |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 176 | |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 177 | 'conditions': [ |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 178 | ['include_internal_video_render==1', { |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 179 | 'defines': ['WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',], |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 180 | }], |
mflodman@webrtc.org | 6af9594 | 2012-05-24 13:23:35 +0000 | [diff] [blame] | 181 | ['include_tests==1', { |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 182 | 'targets': [ |
| 183 | { |
phoglund@webrtc.org | 32fe90b | 2013-08-19 11:40:19 +0000 | [diff] [blame] | 184 | 'target_name': 'video_render_tests', |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 185 | 'type': 'executable', |
| 186 | 'dependencies': [ |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 187 | 'video_render_module', |
| 188 | 'webrtc_utility', |
| 189 | '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', |
andrew@webrtc.org | fa418ac | 2012-09-11 01:34:21 +0000 | [diff] [blame] | 190 | '<(webrtc_root)/common_video/common_video.gyp:common_video', |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 191 | ], |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 192 | 'sources': [ |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 193 | 'test/testAPI/testAPI.cc', |
| 194 | 'test/testAPI/testAPI.h', |
| 195 | 'test/testAPI/testAPI_android.cc', |
| 196 | 'test/testAPI/testAPI_mac.mm', |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 197 | ], |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 198 | 'conditions': [ |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 199 | ['OS=="mac" or OS=="linux"', { |
| 200 | 'cflags': [ |
| 201 | '-Wno-write-strings', |
| 202 | ], |
| 203 | 'ldflags': [ |
| 204 | '-lpthread -lm', |
| 205 | ], |
| 206 | }], |
| 207 | ['OS=="linux"', { |
| 208 | 'libraries': [ |
| 209 | '-lrt', |
| 210 | '-lXext', |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 211 | '-lX11', |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 212 | ], |
| 213 | }], |
| 214 | ['OS=="mac"', { |
| 215 | 'xcode_settings': { |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 216 | 'OTHER_LDFLAGS': [ |
| 217 | '-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL', |
| 218 | ], |
| 219 | }, |
| 220 | }], |
| 221 | ] # conditions |
| 222 | }, # video_render_module_test |
| 223 | ], # targets |
kjellander@webrtc.org | 3365422 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 224 | 'conditions': [ |
| 225 | ['test_isolation_mode != "noop"', { |
| 226 | 'targets': [ |
| 227 | { |
| 228 | 'target_name': 'video_render_tests_run', |
| 229 | 'type': 'none', |
| 230 | 'dependencies': [ |
| 231 | '<(import_isolate_path):import_isolate_gypi', |
| 232 | 'video_render_tests', |
| 233 | ], |
| 234 | 'includes': [ |
| 235 | 'video_render_tests.isolate', |
| 236 | ], |
| 237 | 'sources': [ |
| 238 | 'video_render_tests.isolate', |
| 239 | ], |
| 240 | }, |
| 241 | ], |
| 242 | }], |
| 243 | ], |
mflodman@webrtc.org | 6af9594 | 2012-05-24 13:23:35 +0000 | [diff] [blame] | 244 | }], # include_tests==0 |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 245 | ], # conditions |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 246 | } |
| 247 | |