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 | ], |
| 19 | 'include_dirs': [ |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 20 | 'include', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 21 | '../interface', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 22 | ], |
| 23 | 'direct_dependent_settings': { |
| 24 | 'include_dirs': [ |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 25 | 'include', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 26 | '../interface', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 27 | ], |
| 28 | }, |
| 29 | 'sources': [ |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 30 | 'android/video_render_android_impl.cc', |
leozwang@webrtc.org | ac9fd8a | 2012-03-19 21:09:42 +0000 | [diff] [blame] | 31 | 'android/video_render_android_impl.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 32 | 'android/video_render_android_native_opengl2.cc', |
leozwang@webrtc.org | ac9fd8a | 2012-03-19 21:09:42 +0000 | [diff] [blame] | 33 | 'android/video_render_android_native_opengl2.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 34 | 'android/video_render_android_surface_view.cc', |
leozwang@webrtc.org | ac9fd8a | 2012-03-19 21:09:42 +0000 | [diff] [blame] | 35 | 'android/video_render_android_surface_view.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 36 | 'android/video_render_opengles20.cc', |
leozwang@webrtc.org | ac9fd8a | 2012-03-19 21:09:42 +0000 | [diff] [blame] | 37 | 'android/video_render_opengles20.h', |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 38 | '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.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 | }], |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 91 | ['OS!="linux" or include_internal_video_render==0', { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 92 | '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.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 101 | ['OS!="mac" or include_internal_video_render==0', { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 102 | '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.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 109 | 'mac/video_render_nsopengl.mm', |
| 110 | 'mac/video_render_mac_cocoa_impl.mm', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 111 | '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.org | 132eccb | 2012-02-29 20:55:25 +0000 | [diff] [blame] | 117 | ['OS=="mac"', { |
| 118 | 'direct_dependent_settings': { |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 119 | 'include_dirs': ['mac',], |
kjellander@webrtc.org | 132eccb | 2012-02-29 20:55:25 +0000 | [diff] [blame] | 120 | }, |
| 121 | }], |
tommi@webrtc.org | d2c3bed | 2013-02-18 14:53:04 +0000 | [diff] [blame] | 122 | ['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.org | 6ba79a8 | 2012-11-23 09:41:42 +0000 | [diff] [blame] | 139 | 'include_dirs': [ |
| 140 | '<(directx_sdk_path)/Include', |
| 141 | ], |
| 142 | }], |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 143 | ['OS!="win" or include_internal_video_render==0', { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 144 | 'sources!': [ |
| 145 | 'windows/i_video_render_win.h', |
| 146 | 'windows/video_render_direct3d9.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 147 | 'windows/video_render_windows_impl.h', |
| 148 | 'windows/video_render_direct3d9.cc', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 149 | 'windows/video_render_windows_impl.cc', |
| 150 | ], |
| 151 | }], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 152 | ] # conditions |
| 153 | }, # video_render_module |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 154 | ], # targets |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 155 | |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 156 | 'conditions': [ |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 157 | ['include_internal_video_render==1', { |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 158 | 'defines': ['WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',], |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 159 | }], |
mflodman@webrtc.org | 6af9594 | 2012-05-24 13:23:35 +0000 | [diff] [blame] | 160 | ['include_tests==1', { |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 161 | 'targets': [ |
| 162 | { |
phoglund@webrtc.org | 32fe90b | 2013-08-19 11:40:19 +0000 | [diff] [blame^] | 163 | 'target_name': 'video_render_tests', |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 164 | 'type': 'executable', |
| 165 | 'dependencies': [ |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 166 | 'video_render_module', |
| 167 | 'webrtc_utility', |
| 168 | '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', |
andrew@webrtc.org | fa418ac | 2012-09-11 01:34:21 +0000 | [diff] [blame] | 169 | '<(webrtc_root)/common_video/common_video.gyp:common_video', |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 170 | ], |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 171 | 'sources': [ |
andrew@webrtc.org | 9841d92 | 2012-10-31 05:22:11 +0000 | [diff] [blame] | 172 | 'test/testAPI/testAPI.cc', |
| 173 | 'test/testAPI/testAPI.h', |
| 174 | 'test/testAPI/testAPI_android.cc', |
| 175 | 'test/testAPI/testAPI_mac.mm', |
andrew@webrtc.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 176 | ], |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 177 | 'conditions': [ |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 178 | ['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.org | 199f4de | 2011-10-11 15:43:35 +0000 | [diff] [blame] | 190 | '-lX11', |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 191 | ], |
| 192 | }], |
| 193 | ['OS=="mac"', { |
| 194 | 'xcode_settings': { |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 195 | '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.org | 6af9594 | 2012-05-24 13:23:35 +0000 | [diff] [blame] | 203 | }], # include_tests==0 |
xians@google.com | 0922815 | 2011-08-08 11:44:07 +0000 | [diff] [blame] | 204 | ], # conditions |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 205 | } |
| 206 | |