Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / video_render / BUILD.gn
1 # Copyright (c) 2014 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.
8
9 import("../../build/webrtc.gni")
10
11 source_set("video_render") {
12   sources = [
13     "external/video_render_external_impl.cc",
14     "external/video_render_external_impl.h",
15     "i_video_render.h",
16     "include/video_render.h",
17     "include/video_render_defines.h",
18     "incoming_video_stream.cc",
19     "incoming_video_stream.h",
20     "video_render_frames.cc",
21     "video_render_frames.h",
22     "video_render_impl.h",
23   ]
24
25   deps = [
26     "../../common_video",
27     "../../system_wrappers",
28     "../utility",
29   ]
30
31   configs += [ "../..:common_config" ]
32   public_configs = [ "../..:common_inherited_config" ]
33
34   if (is_clang) {
35     # Suppress warnings from Chrome's Clang plugins.
36     # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
37     configs -= [ "//build/config/clang:find_bad_constructs" ]
38   }
39 }
40
41 source_set("video_render_impl") {
42   sources = [
43     "video_render_impl.cc",
44   ]
45   deps = [
46     ":video_render",
47     "../../system_wrappers",
48   ]
49
50   configs += [ "../..:common_config" ]
51   public_configs = [ "../..:common_inherited_config" ]
52
53   if (is_clang) {
54     # Suppress warnings from Chrome's Clang plugins.
55     # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
56     configs -= [ "//build/config/clang:find_bad_constructs" ]
57   }
58 }
59
60 config("video_render_internal_impl_config") {
61   if (is_ios) {
62     libs = [
63       "OpenGLES.framework",
64       "QuartzCore.framework",
65     ]
66   }
67 }
68
69 source_set("video_render_internal_impl") {
70   libs = []
71   sources = [
72     "video_render_internal_impl.cc",
73   ]
74   deps = [
75     ":video_render",
76     "../../system_wrappers",
77   ]
78
79   if (is_linux) {
80     sources += [
81       "linux/video_render_linux_impl.cc",
82       "linux/video_render_linux_impl.h",
83       "linux/video_x11_channel.cc",
84       "linux/video_x11_channel.h",
85       "linux/video_x11_render.cc",
86       "linux/video_x11_render.h",
87     ]
88
89     libs += [ "Xext" ]
90   }
91   if (is_mac) {
92     sources += [
93       "mac/cocoa_full_screen_window.h",
94       "mac/cocoa_full_screen_window.mm",
95       "mac/cocoa_render_view.h",
96       "mac/cocoa_render_view.mm",
97       "mac/video_render_agl.cc",
98       "mac/video_render_agl.h",
99       "mac/video_render_mac_carbon_impl.cc",
100       "mac/video_render_mac_carbon_impl.h",
101       "mac/video_render_mac_cocoa_impl.h",
102       "mac/video_render_mac_cocoa_impl.mm",
103       "mac/video_render_nsopengl.h",
104       "mac/video_render_nsopengl.mm",
105     ]
106
107     libs += [
108       "CoreVideo.framework",
109       "QTKit.framework",
110     ]
111   }
112   if (is_win) {
113     sources += [
114       "windows/i_video_render_win.h",
115       "windows/video_render_direct3d9.cc",
116       "windows/video_render_direct3d9.h",
117       "windows/video_render_windows_impl.cc",
118       "windows/video_render_windows_impl.h",
119     ]
120
121     directxsdk_exists =
122       (exec_script("//build/dir_exists.py",
123                    [ rebase_path("//third_party/directxsdk/files",
124                                  root_build_dir) ],
125                    "trim string") == "True")
126     if (directxsdk_exists) {
127       directxsdk_path = "//third_party/directxsdk/files"
128     } else {
129       directxsdk_path = getenv("DXSDK_DIR")
130     }
131     include_dirs = [ directxsdk_path +  "/Include" ]
132   }
133   if (is_android) {
134     sources += [
135       "android/video_render_android_impl.cc",
136       "android/video_render_android_impl.h",
137       "android/video_render_android_native_opengl2.cc",
138       "android/video_render_android_native_opengl2.h",
139       "android/video_render_android_surface_view.cc",
140       "android/video_render_android_surface_view.h",
141       "android/video_render_opengles20.cc",
142       "android/video_render_opengles20.h",
143     ]
144
145     libs += [ "GLESv2" ]
146   }
147   if (is_ios) {
148     sources += [
149       "ios/open_gles20.h",
150       "ios/open_gles20.mm",
151       "ios/video_render_ios_channel.h",
152       "ios/video_render_ios_channel.mm",
153       "ios/video_render_ios_gles20.h",
154       "ios/video_render_ios_gles20.mm",
155       "ios/video_render_ios_impl.h",
156       "ios/video_render_ios_impl.mm",
157       "ios/video_render_ios_view.h",
158       "ios/video_render_ios_view.mm",
159     ]
160
161     cflags += [ "-fobjc-arc" ]  # CLANG_ENABLE_OBJC_ARC = YES.
162   }
163
164   all_dependent_configs = [ ":video_render_internal_impl_config"]
165
166   configs += [ "../..:common_config" ]
167   public_configs = [ "../..:common_inherited_config" ]
168
169   if (is_clang) {
170     # Suppress warnings from Chrome's Clang plugins.
171     # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
172     configs -= [ "//build/config/clang:find_bad_constructs" ]
173   }
174 }