blob: 3ab2f0706e5da00393fb8b4fd1eae08d3ce26044 [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 }],
kjellander@webrtc.org6ba79a82012-11-23 09:41:42 +0000122 ['OS=="win"', {
123 'include_dirs': [
124 '<(directx_sdk_path)/Include',
125 ],
126 }],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000127 ['OS!="win" or include_internal_video_render==0', {
niklase@google.com470e71d2011-07-07 08:21:25 +0000128 'sources!': [
129 'windows/i_video_render_win.h',
130 'windows/video_render_direct3d9.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000131 'windows/video_render_windows_impl.h',
132 'windows/video_render_direct3d9.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +0000133 'windows/video_render_windows_impl.cc',
134 ],
135 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000136 ] # conditions
137 }, # video_render_module
niklase@google.com470e71d2011-07-07 08:21:25 +0000138 ], # targets
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000139
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000140 'conditions': [
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000141 ['include_internal_video_render==1', {
andrew@webrtc.org9841d922012-10-31 05:22:11 +0000142 'defines': ['WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',],
wu@webrtc.orgf3f2f6a2011-10-19 18:42:17 +0000143 }],
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000144 ['include_tests==1', {
xians@google.com09228152011-08-08 11:44:07 +0000145 'targets': [
146 {
147 'target_name': 'video_render_module_test',
148 'type': 'executable',
149 'dependencies': [
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000150 'video_render_module',
151 'webrtc_utility',
152 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
andrew@webrtc.orgfa418ac2012-09-11 01:34:21 +0000153 '<(webrtc_root)/common_video/common_video.gyp:common_video',
xians@google.com09228152011-08-08 11:44:07 +0000154 ],
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000155 'sources': [
andrew@webrtc.org9841d922012-10-31 05:22:11 +0000156 'test/testAPI/testAPI.cc',
157 'test/testAPI/testAPI.h',
158 'test/testAPI/testAPI_android.cc',
159 'test/testAPI/testAPI_mac.mm',
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000160 ],
xians@google.com09228152011-08-08 11:44:07 +0000161 'conditions': [
xians@google.com09228152011-08-08 11:44:07 +0000162 ['OS=="mac" or OS=="linux"', {
163 'cflags': [
164 '-Wno-write-strings',
165 ],
166 'ldflags': [
167 '-lpthread -lm',
168 ],
169 }],
170 ['OS=="linux"', {
171 'libraries': [
172 '-lrt',
173 '-lXext',
andrew@webrtc.org199f4de2011-10-11 15:43:35 +0000174 '-lX11',
xians@google.com09228152011-08-08 11:44:07 +0000175 ],
176 }],
177 ['OS=="mac"', {
178 'xcode_settings': {
xians@google.com09228152011-08-08 11:44:07 +0000179 'OTHER_LDFLAGS': [
180 '-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL',
181 ],
182 },
183 }],
184 ] # conditions
185 }, # video_render_module_test
186 ], # targets
mflodman@webrtc.org6af95942012-05-24 13:23:35 +0000187 }], # include_tests==0
xians@google.com09228152011-08-08 11:44:07 +0000188 ], # conditions
niklase@google.com470e71d2011-07-07 08:21:25 +0000189}
190