blob: 71d969baba2ea2add27554ef16b3c1550be73a26 [file] [log] [blame]
xians@google.comd3185fe2011-09-12 12:24:39 +00001# 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.com470e71d2011-07-07 08:21:25 +00008
9{
niklase@google.com470e71d2011-07-07 08:21:25 +000010 'targets': [
11 {
12 'target_name': 'video_render_module',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000013 'type': 'static_library',
niklase@google.com470e71d2011-07-07 08:21:25 +000014 'dependencies': [
xians@google.comd3185fe2011-09-12 12:24:39 +000015 'webrtc_utility',
andrew@webrtc.orgfa418ac2012-09-11 01:34:21 +000016 '<(webrtc_root)/common_video/common_video.gyp:common_video',
xians@google.comd3185fe2011-09-12 12:24:39 +000017 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
niklase@google.com470e71d2011-07-07 08:21:25 +000018 ],
niklase@google.com470e71d2011-07-07 08:21:25 +000019 'sources': [
andrew@webrtc.org9841d922012-10-31 05:22:11 +000020 'android/video_render_android_impl.cc',
leozwang@webrtc.orgac9fd8a2012-03-19 21:09:42 +000021 'android/video_render_android_impl.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000022 'android/video_render_android_native_opengl2.cc',
leozwang@webrtc.orgac9fd8a2012-03-19 21:09:42 +000023 'android/video_render_android_native_opengl2.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000024 'android/video_render_android_surface_view.cc',
leozwang@webrtc.orgac9fd8a2012-03-19 21:09:42 +000025 'android/video_render_android_surface_view.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000026 'android/video_render_opengles20.cc',
leozwang@webrtc.orgac9fd8a2012-03-19 21:09:42 +000027 'android/video_render_opengles20.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000028 '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.org36cf4d22013-09-12 17:39:53 +000035 '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.org9841d922012-10-31 05:22:11 +000045 'linux/video_render_linux_impl.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000046 'linux/video_render_linux_impl.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000047 'linux/video_x11_channel.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000048 'linux/video_x11_channel.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000049 'linux/video_x11_render.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000050 'linux/video_x11_render.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000051 'mac/cocoa_full_screen_window.mm',
niklase@google.com470e71d2011-07-07 08:21:25 +000052 'mac/cocoa_full_screen_window.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000053 'mac/cocoa_render_view.mm',
niklase@google.com470e71d2011-07-07 08:21:25 +000054 'mac/cocoa_render_view.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000055 'mac/video_render_agl.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000056 'mac/video_render_agl.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000057 'mac/video_render_mac_carbon_impl.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000058 'mac/video_render_mac_carbon_impl.h',
59 'mac/video_render_mac_cocoa_impl.h',
andrew@webrtc.org199f4de2011-10-11 15:43:35 +000060 'mac/video_render_mac_cocoa_impl.mm',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000061 '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.com470e71d2011-07-07 08:21:25 +000068 'windows/video_render_direct3d9.cc',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000069 'windows/video_render_direct3d9.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000070 'windows/video_render_windows_impl.cc',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000071 'windows/video_render_windows_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000072 ],
andrew@webrtc.org199f4de2011-10-11 15:43:35 +000073 # TODO(andrew): with the proper suffix, these files will be excluded
74 # automatically.
niklase@google.com470e71d2011-07-07 08:21:25 +000075 'conditions': [
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +000076 ['include_internal_video_render==1', {
andrew@webrtc.org9841d922012-10-31 05:22:11 +000077 'defines': ['WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +000078 }],
leozwang@webrtc.org66487e12012-03-05 19:34:06 +000079 ['OS!="android" or include_internal_video_render==0', {
80 'sources!': [
leozwang@webrtc.orgac9fd8a2012-03-19 21:09:42 +000081 '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.org66487e12012-03-05 19:34:06 +000089 ],
kjellander@webrtc.org59343ee2014-04-29 09:36:40 +000090 }, {
fischman@webrtc.orgb1eb4312014-05-07 00:09:30 +000091 'link_settings': {
kjellander@webrtc.org59343ee2014-04-29 09:36:40 +000092 'libraries': [
93 '-lGLESv2',
94 ],
95 },
leozwang@webrtc.org66487e12012-03-05 19:34:06 +000096 }],
fischman@webrtc.org36cf4d22013-09-12 17:39:53 +000097 ['OS!="ios" or include_internal_video_render==0', {
98 'sources!': [
99 # iOS
100 'ios/open_gles20.h',
101 'ios/open_gles20.mm',
102 'ios/video_render_ios_channel.h',
103 'ios/video_render_ios_channel.mm',
104 'ios/video_render_ios_gles20.h',
105 'ios/video_render_ios_gles20.mm',
106 'ios/video_render_ios_impl.h',
107 'ios/video_render_ios_impl.mm',
108 'ios/video_render_ios_view.h',
109 'ios/video_render_ios_view.mm',
110 ],
111 }],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000112 ['OS!="linux" or include_internal_video_render==0', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000113 'sources!': [
114 'linux/video_render_linux_impl.h',
115 'linux/video_x11_channel.h',
116 'linux/video_x11_render.h',
117 'linux/video_render_linux_impl.cc',
118 'linux/video_x11_channel.cc',
119 'linux/video_x11_render.cc',
120 ],
fischman@webrtc.orgb1eb4312014-05-07 00:09:30 +0000121 }, {
122 'link_settings': {
123 'libraries': [
124 '-lXext',
125 ],
126 },
niklase@google.com470e71d2011-07-07 08:21:25 +0000127 }],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000128 ['OS!="mac" or include_internal_video_render==0', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000129 'sources!': [
130 'mac/cocoa_full_screen_window.h',
131 'mac/cocoa_render_view.h',
132 'mac/video_render_agl.h',
133 'mac/video_render_mac_carbon_impl.h',
134 'mac/video_render_mac_cocoa_impl.h',
135 'mac/video_render_nsopengl.h',
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000136 'mac/video_render_nsopengl.mm',
137 'mac/video_render_mac_cocoa_impl.mm',
niklase@google.com470e71d2011-07-07 08:21:25 +0000138 'mac/video_render_agl.cc',
139 'mac/video_render_mac_carbon_impl.cc',
140 'mac/cocoa_render_view.mm',
141 'mac/cocoa_full_screen_window.mm',
142 ],
143 }],
fischman@webrtc.org36cf4d22013-09-12 17:39:53 +0000144 ['OS=="ios"', {
fischman@webrtc.orge68102e2014-03-25 05:15:44 +0000145 'xcode_settings': {
146 'CLANG_ENABLE_OBJC_ARC': 'YES',
147 },
fischman@webrtc.org36cf4d22013-09-12 17:39:53 +0000148 'all_dependent_settings': {
149 'xcode_settings': {
150 'OTHER_LDFLAGS': [
151 '-framework OpenGLES',
152 '-framework QuartzCore',
153 '-framework UIKit',
154 ],
155 },
156 },
157 }],
tommi@webrtc.orgd2c3bed2013-02-18 14:53:04 +0000158 ['OS=="win" and include_internal_video_render==1', {
159 'variables': {
160 # 'directx_sdk_path' will be overridden in the condition block
161 # below, but it must not be declared as empty here since gyp
162 # will check if the first character is '/' for some reason.
163 # If it's empty, we'll get an out-of-bounds error.
164 'directx_sdk_path': 'will_be_overridden',
165 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
166 'conditions': [
167 ['"<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
168 'directx_sdk_path': '<(DEPTH)/third_party/directxsdk/files',
169 }, {
170 'directx_sdk_path': '$(DXSDK_DIR)',
171 }],
172 ],
173 },
174
kjellander@webrtc.org6ba79a82012-11-23 09:41:42 +0000175 'include_dirs': [
176 '<(directx_sdk_path)/Include',
177 ],
178 }],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000179 ['OS!="win" or include_internal_video_render==0', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000180 'sources!': [
181 'windows/i_video_render_win.h',
182 'windows/video_render_direct3d9.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000183 'windows/video_render_windows_impl.h',
184 'windows/video_render_direct3d9.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000185 'windows/video_render_windows_impl.cc',
186 ],
187 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000188 ] # conditions
189 }, # video_render_module
niklase@google.com470e71d2011-07-07 08:21:25 +0000190 ], # targets
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000191
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000192 'conditions': [
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000193 ['include_internal_video_render==1', {
andrew@webrtc.org9841d922012-10-31 05:22:11 +0000194 'defines': ['WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000195 }],
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000196 ['include_tests==1', {
xians@google.com09228152011-08-08 11:44:07 +0000197 'targets': [
198 {
phoglund@webrtc.org32fe90b2013-08-19 11:40:19 +0000199 'target_name': 'video_render_tests',
xians@google.com09228152011-08-08 11:44:07 +0000200 'type': 'executable',
201 'dependencies': [
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000202 'video_render_module',
203 'webrtc_utility',
204 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
andrew@webrtc.orgfa418ac2012-09-11 01:34:21 +0000205 '<(webrtc_root)/common_video/common_video.gyp:common_video',
xians@google.com09228152011-08-08 11:44:07 +0000206 ],
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000207 'sources': [
andrew@webrtc.org9841d922012-10-31 05:22:11 +0000208 'test/testAPI/testAPI.cc',
209 'test/testAPI/testAPI.h',
210 'test/testAPI/testAPI_android.cc',
211 'test/testAPI/testAPI_mac.mm',
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000212 ],
xians@google.com09228152011-08-08 11:44:07 +0000213 'conditions': [
xians@google.com09228152011-08-08 11:44:07 +0000214 ['OS=="mac" or OS=="linux"', {
215 'cflags': [
216 '-Wno-write-strings',
217 ],
218 'ldflags': [
219 '-lpthread -lm',
220 ],
221 }],
222 ['OS=="linux"', {
fischman@webrtc.orgb1eb4312014-05-07 00:09:30 +0000223 'link_settings': {
224 'libraries': [
225 '-lX11',
226 ],
227 },
xians@google.com09228152011-08-08 11:44:07 +0000228 }],
229 ['OS=="mac"', {
230 'xcode_settings': {
xians@google.com09228152011-08-08 11:44:07 +0000231 'OTHER_LDFLAGS': [
232 '-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL',
233 ],
234 },
235 }],
236 ] # conditions
237 }, # video_render_module_test
238 ], # targets
kjellander@webrtc.org33654222013-08-22 07:57:00 +0000239 'conditions': [
240 ['test_isolation_mode != "noop"', {
241 'targets': [
242 {
243 'target_name': 'video_render_tests_run',
244 'type': 'none',
245 'dependencies': [
kjellander@webrtc.org33654222013-08-22 07:57:00 +0000246 'video_render_tests',
247 ],
248 'includes': [
kjellander@webrtc.org2a973172013-10-02 19:31:16 +0000249 '../../build/isolate.gypi',
kjellander@webrtc.org33654222013-08-22 07:57:00 +0000250 'video_render_tests.isolate',
251 ],
252 'sources': [
253 'video_render_tests.isolate',
254 ],
255 },
256 ],
257 }],
258 ],
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000259 }], # include_tests==0
xians@google.com09228152011-08-08 11:44:07 +0000260 ], # conditions
niklase@google.com470e71d2011-07-07 08:21:25 +0000261}
262