Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / video_capture / 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 # Note this target is missing an implementation for the video capture.
12 # Targets must link with either 'video_capture_impl' or
13 # 'video_capture_internal_impl' depending on whether they want to
14 # use the internal capturer.
15 source_set("video_capture") {
16   sources = [
17     "device_info_impl.cc",
18     "device_info_impl.h",
19     "include/video_capture.h",
20     "include/video_capture_defines.h",
21     "include/video_capture_factory.h",
22     "video_capture_config.h",
23     "video_capture_delay.h",
24     "video_capture_factory.cc",
25     "video_capture_impl.cc",
26     "video_capture_impl.h",
27   ]
28
29   deps = [
30     "../../common_video",
31     "../../system_wrappers",
32     "../utility",
33   ]
34
35   configs += [ "../..:common_config" ]
36   public_configs = [ "../..:common_inherited_config" ]
37
38   if (is_clang) {
39     # Suppress warnings from Chrome's Clang plugins.
40     # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
41     configs -= [ "//build/config/clang:find_bad_constructs" ]
42   }
43 }
44
45 source_set("video_capture_impl") {
46   sources = [
47     "external/device_info_external.cc",
48     "external/video_capture_external.cc",
49   ]
50
51   deps = [
52     ":video_capture",
53     "../../system_wrappers",
54   ]
55
56   configs += [ "../..:common_config" ]
57   public_configs = [ "../..:common_inherited_config" ]
58
59   if (is_clang) {
60     # Suppress warnings from Chrome's Clang plugins.
61     # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
62     configs -= [ "//build/config/clang:find_bad_constructs" ]
63   }
64 }
65
66 config("video_capture_internal_impl_config") {
67   if (is_ios) {
68     libs = [
69       "AVFoundation.framework",
70       "CoreMedia.framework",
71       "CoreVideo.framework",
72     ]
73   }
74 }
75
76 source_set("video_capture_internal_impl") {
77   deps = [
78     ":video_capture",
79     "../../system_wrappers",
80   ]
81
82   if (is_linux) {
83     sources = [
84       "linux/device_info_linux.cc",
85       "linux/device_info_linux.h",
86       "linux/video_capture_linux.cc",
87       "linux/video_capture_linux.h",
88     ]
89   }
90   if (is_mac) {
91     sources = [
92       "mac/qtkit/video_capture_qtkit.h",
93       "mac/qtkit/video_capture_qtkit.mm",
94       "mac/qtkit/video_capture_qtkit_info.h",
95       "mac/qtkit/video_capture_qtkit_info.mm",
96       "mac/qtkit/video_capture_qtkit_info_objc.h",
97       "mac/qtkit/video_capture_qtkit_info_objc.mm",
98       "mac/qtkit/video_capture_qtkit_objc.h",
99       "mac/qtkit/video_capture_qtkit_objc.mm",
100       "mac/qtkit/video_capture_qtkit_utility.h",
101       "mac/video_capture_mac.mm",
102     ]
103
104     libs = [
105       "CoreVideo.framework",
106       "QTKit.framework",
107     ]
108   }
109   # winsdk_samples isn't pulled into Chromium, so it is disabled for Chromium
110   # builds. This is not a problem since the internal video capture
111   # implementation should not be used in chrome - issue 3831.
112   if (is_win && !build_with_chromium) {
113     sources = [
114       "windows/device_info_ds.cc",
115       "windows/device_info_ds.h",
116       "windows/device_info_mf.cc",
117       "windows/device_info_mf.h",
118       "windows/help_functions_ds.cc",
119       "windows/help_functions_ds.h",
120       "windows/sink_filter_ds.cc",
121       "windows/sink_filter_ds.h",
122       "windows/video_capture_ds.cc",
123       "windows/video_capture_ds.h",
124       "windows/video_capture_factory_windows.cc",
125       "windows/video_capture_mf.cc",
126       "windows/video_capture_mf.h",
127     ]
128
129     libs = [ "Strmiids.lib" ]
130
131     deps += [ "//third_party/winsdk_samples"]
132   }
133   if (is_android) {
134     sources = [
135       "android/device_info_android.cc",
136       "android/device_info_android.h",
137       "android/video_capture_android.cc",
138       "android/video_capture_android.h",
139     ]
140
141     deps += [
142       "//third_party/icu:icuuc",
143       "//third_party/jsoncpp",
144     ]
145   }
146   if (is_ios) {
147     sources = [
148       "ios/device_info_ios.h",
149       "ios/device_info_ios.mm",
150       "ios/device_info_ios_objc.h",
151       "ios/device_info_ios_objc.mm",
152       "ios/rtc_video_capture_ios_objc.h",
153       "ios/rtc_video_capture_ios_objc.mm",
154       "ios/video_capture_ios.h",
155       "ios/video_capture_ios.mm",
156     ]
157
158     cflags = [
159       "-fobjc-arc",  # CLANG_ENABLE_OBJC_ARC = YES.
160       # To avoid warnings for deprecated videoMinFrameDuration and
161       # videoMaxFrameDuration properties in iOS 7.0.
162       # See webrtc:3705 for more details.
163       "-Wno-deprecated-declarations",
164     ]
165   }
166
167   all_dependent_configs = [ ":video_capture_internal_impl_config" ]
168
169   configs += [ "../..:common_config" ]
170   public_configs = [ "../..:common_inherited_config" ]
171
172   if (is_clang) {
173     # Suppress warnings from Chrome's Clang plugins.
174     # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
175     configs -= [ "//build/config/clang:find_bad_constructs" ]
176   }
177 }