blob: 83802c0361c37d7a9007729eb5b50fe676186cb8 [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 ],
19 'include_dirs': [
andrew@webrtc.org9841d922012-10-31 05:22:11 +000020 'include',
niklase@google.com470e71d2011-07-07 08:21:25 +000021 '../interface',
niklase@google.com470e71d2011-07-07 08:21:25 +000022 ],
23 'direct_dependent_settings': {
24 'include_dirs': [
andrew@webrtc.org9841d922012-10-31 05:22:11 +000025 'include',
niklase@google.com470e71d2011-07-07 08:21:25 +000026 '../interface',
niklase@google.com470e71d2011-07-07 08:21:25 +000027 ],
28 },
29 'sources': [
andrew@webrtc.org9841d922012-10-31 05:22:11 +000030 'android/video_render_android_impl.cc',
leozwang@webrtc.orgac9fd8a2012-03-19 21:09:42 +000031 'android/video_render_android_impl.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000032 'android/video_render_android_native_opengl2.cc',
leozwang@webrtc.orgac9fd8a2012-03-19 21:09:42 +000033 'android/video_render_android_native_opengl2.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000034 'android/video_render_android_surface_view.cc',
leozwang@webrtc.orgac9fd8a2012-03-19 21:09:42 +000035 'android/video_render_android_surface_view.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000036 'android/video_render_opengles20.cc',
leozwang@webrtc.orgac9fd8a2012-03-19 21:09:42 +000037 'android/video_render_opengles20.h',
andrew@webrtc.org9841d922012-10-31 05:22:11 +000038 'external/video_render_external_impl.cc',
39 'external/video_render_external_impl.h',
40 'i_video_render.h',
41 'include/video_render.h',
42 'include/video_render_defines.h',
43 'incoming_video_stream.cc',
44 'incoming_video_stream.h',
45 '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 ],
90 }],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +000091 ['OS!="linux" or include_internal_video_render==0', {
niklase@google.com470e71d2011-07-07 08:21:25 +000092 'sources!': [
93 'linux/video_render_linux_impl.h',
94 'linux/video_x11_channel.h',
95 'linux/video_x11_render.h',
96 'linux/video_render_linux_impl.cc',
97 'linux/video_x11_channel.cc',
98 'linux/video_x11_render.cc',
99 ],
100 }],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000101 ['OS!="mac" or include_internal_video_render==0', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000102 'sources!': [
103 'mac/cocoa_full_screen_window.h',
104 'mac/cocoa_render_view.h',
105 'mac/video_render_agl.h',
106 'mac/video_render_mac_carbon_impl.h',
107 'mac/video_render_mac_cocoa_impl.h',
108 'mac/video_render_nsopengl.h',
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000109 'mac/video_render_nsopengl.mm',
110 'mac/video_render_mac_cocoa_impl.mm',
niklase@google.com470e71d2011-07-07 08:21:25 +0000111 'mac/video_render_agl.cc',
112 'mac/video_render_mac_carbon_impl.cc',
113 'mac/cocoa_render_view.mm',
114 'mac/cocoa_full_screen_window.mm',
115 ],
116 }],
kjellander@webrtc.org132eccb2012-02-29 20:55:25 +0000117 ['OS=="mac"', {
118 'direct_dependent_settings': {
andrew@webrtc.org9841d922012-10-31 05:22:11 +0000119 'include_dirs': ['mac',],
kjellander@webrtc.org132eccb2012-02-29 20:55:25 +0000120 },
121 }],
tommi@webrtc.orgd2c3bed2013-02-18 14:53:04 +0000122 ['OS=="win" and include_internal_video_render==1', {
123 'variables': {
124 # 'directx_sdk_path' will be overridden in the condition block
125 # below, but it must not be declared as empty here since gyp
126 # will check if the first character is '/' for some reason.
127 # If it's empty, we'll get an out-of-bounds error.
128 'directx_sdk_path': 'will_be_overridden',
129 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
130 'conditions': [
131 ['"<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
132 'directx_sdk_path': '<(DEPTH)/third_party/directxsdk/files',
133 }, {
134 'directx_sdk_path': '$(DXSDK_DIR)',
135 }],
136 ],
137 },
138
kjellander@webrtc.org6ba79a82012-11-23 09:41:42 +0000139 'include_dirs': [
140 '<(directx_sdk_path)/Include',
141 ],
142 }],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000143 ['OS!="win" or include_internal_video_render==0', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000144 'sources!': [
145 'windows/i_video_render_win.h',
146 'windows/video_render_direct3d9.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000147 'windows/video_render_windows_impl.h',
148 'windows/video_render_direct3d9.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000149 'windows/video_render_windows_impl.cc',
150 ],
151 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000152 ] # conditions
153 }, # video_render_module
niklase@google.com470e71d2011-07-07 08:21:25 +0000154 ], # targets
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000155
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000156 'conditions': [
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000157 ['include_internal_video_render==1', {
andrew@webrtc.org9841d922012-10-31 05:22:11 +0000158 'defines': ['WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000159 }],
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000160 ['include_tests==1', {
xians@google.com09228152011-08-08 11:44:07 +0000161 'targets': [
162 {
phoglund@webrtc.org32fe90b2013-08-19 11:40:19 +0000163 'target_name': 'video_render_tests',
xians@google.com09228152011-08-08 11:44:07 +0000164 'type': 'executable',
165 'dependencies': [
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000166 'video_render_module',
167 'webrtc_utility',
168 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
andrew@webrtc.orgfa418ac2012-09-11 01:34:21 +0000169 '<(webrtc_root)/common_video/common_video.gyp:common_video',
xians@google.com09228152011-08-08 11:44:07 +0000170 ],
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000171 'sources': [
andrew@webrtc.org9841d922012-10-31 05:22:11 +0000172 'test/testAPI/testAPI.cc',
173 'test/testAPI/testAPI.h',
174 'test/testAPI/testAPI_android.cc',
175 'test/testAPI/testAPI_mac.mm',
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000176 ],
xians@google.com09228152011-08-08 11:44:07 +0000177 'conditions': [
xians@google.com09228152011-08-08 11:44:07 +0000178 ['OS=="mac" or OS=="linux"', {
179 'cflags': [
180 '-Wno-write-strings',
181 ],
182 'ldflags': [
183 '-lpthread -lm',
184 ],
185 }],
186 ['OS=="linux"', {
187 'libraries': [
188 '-lrt',
189 '-lXext',
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000190 '-lX11',
xians@google.com09228152011-08-08 11:44:07 +0000191 ],
192 }],
193 ['OS=="mac"', {
194 'xcode_settings': {
xians@google.com09228152011-08-08 11:44:07 +0000195 'OTHER_LDFLAGS': [
196 '-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL',
197 ],
198 },
199 }],
200 ] # conditions
201 }, # video_render_module_test
202 ], # targets
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000203 }], # include_tests==0
xians@google.com09228152011-08-08 11:44:07 +0000204 ], # conditions
niklase@google.com470e71d2011-07-07 08:21:25 +0000205}
206