blob: 8eb881e8e0902f717b56f85af25b8c67815d9c6b [file] [log] [blame]
henrike@webrtc.orgf0488722014-05-13 18:00:26 +00001# 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{
10 'includes': [ '../build/common.gypi', ],
11 'conditions': [
kjellandera8a7ef62016-04-05 08:13:31 -070012 ['os_posix==1 and OS!="mac" and OS!="ios"', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000013 'conditions': [
14 ['sysroot!=""', {
15 'variables': {
16 'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
17 },
18 }, {
19 'variables': {
20 'pkg-config': 'pkg-config'
21 },
22 }],
23 ],
24 }],
25 ],
26 'targets': [
27 {
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000028 # The subset of rtc_base approved for use outside of libjingle.
29 'target_name': 'rtc_base_approved',
30 'type': 'static_library',
31 'sources': [
Karl Wiberge2a83ee2015-10-26 19:51:29 +010032 'array_view.h',
Peter Boströmff019b02015-04-30 14:16:07 +020033 'atomicops.h',
Tommicc4fdde2016-04-22 19:34:59 +020034 'bind.h',
Noah Richards915590e2015-04-22 15:43:08 -070035 'bitbuffer.cc',
36 'bitbuffer.h',
Karl Wiberg94784372015-04-20 14:03:07 +020037 'buffer.h',
Joachim Bauch6f2ef742015-05-21 17:52:01 +020038 'bufferqueue.cc',
39 'bufferqueue.h',
Noah Richards915590e2015-04-22 15:43:08 -070040 'bytebuffer.cc',
41 'bytebuffer.h',
42 'byteorder.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000043 'checks.cc',
44 'checks.h',
Noah Richards915590e2015-04-22 15:43:08 -070045 'constructormagic.h',
tommiebfbab52016-03-19 11:36:18 -070046 'copyonwritebuffer.cc',
47 'copyonwritebuffer.h',
Tommi494f2092015-04-27 17:39:23 +020048 'criticalsection.cc',
49 'criticalsection.h',
kwiberg45fd9fe2015-12-16 01:09:16 -080050 'deprecation.h',
tommi@webrtc.org4c0fd962015-02-09 10:23:27 +000051 'event.cc',
52 'event.h',
tommi@webrtc.org7c64ed22015-03-17 14:25:37 +000053 'event_tracer.cc',
54 'event_tracer.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000055 'exp_filter.cc',
56 'exp_filter.h',
57 'md5.cc',
58 'md5.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +000059 'md5digest.cc',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000060 'md5digest.h',
philipel5ab4c6d2016-03-08 03:36:15 -080061 'mod_ops.h',
skvlad98bb6642016-04-07 15:36:45 -070062 'onetimeevent.h',
Karl Wibergbe579832015-11-10 22:34:18 +010063 'optional.h',
xians@webrtc.orge46bc772014-10-10 08:36:56 +000064 'platform_file.cc',
65 'platform_file.h',
Tommibebc6902015-05-18 09:51:42 +020066 'platform_thread.cc',
67 'platform_thread.h',
pbos12411ef2015-11-23 14:47:56 -080068 'platform_thread_types.h',
terelius84e78f92015-12-10 01:50:55 -080069 'random.cc',
70 'random.h',
tkchinf75d0082016-02-23 22:49:42 -080071 'rate_statistics.cc',
72 'rate_statistics.h',
Peter Boström2ee24392015-06-22 07:57:16 +020073 'ratetracker.cc',
74 'ratetracker.h',
tommi04af8392016-02-14 08:11:10 -080075 'refcount.h',
Tommid44c0772016-03-11 17:12:32 -080076 'safe_conversions.h',
77 'safe_conversions_impl.h',
kwiberg6ab3db22016-05-11 05:07:26 -070078 'scoped_ptr.h',
tommi04af8392016-02-14 08:11:10 -080079 'scoped_ref_ptr.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000080 'stringencode.cc',
81 'stringencode.h',
82 'stringutils.cc',
83 'stringutils.h',
terelius85fa7d52016-03-24 01:51:52 -070084 'swap_queue.h',
tommiefefda62015-08-20 05:04:09 -070085 'systeminfo.cc',
86 'systeminfo.h',
tommic06b1332016-05-14 11:31:40 -070087 'task_queue.h',
88 'task_queue_libevent.cc',
89 'task_queue_gcd.cc',
90 'task_queue_posix.cc',
91 'task_queue_posix.h',
92 'task_queue_win.cc',
kwiberg@webrtc.orgaf9d56f2015-01-13 20:32:04 +000093 'template_util.h',
pbos@webrtc.org38344ed2014-09-24 06:05:00 +000094 'thread_annotations.h',
tommi@webrtc.org04cd4662015-01-26 15:27:29 +000095 'thread_checker.h',
96 'thread_checker_impl.cc',
97 'thread_checker_impl.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000098 'timeutils.cc',
99 'timeutils.h',
tommi@webrtc.org7c64ed22015-03-17 14:25:37 +0000100 'trace_event.h',
Noah Richards915590e2015-04-22 15:43:08 -0700101 ],
102 'conditions': [
103 ['build_with_chromium==1', {
Peter Boström11e02292015-11-25 21:36:14 +0100104 'dependencies': [
105 '<(DEPTH)/base/base.gyp:base',
106 ],
Noah Richards915590e2015-04-22 15:43:08 -0700107 'include_dirs': [
henrikgee2bf412015-09-30 03:48:52 -0700108 '../../webrtc_overrides',
Noah Richards915590e2015-04-22 15:43:08 -0700109 ],
Peter Boström11e02292015-11-25 21:36:14 +0100110 'sources': [
111 '../../webrtc_overrides/webrtc/base/logging.cc',
112 '../../webrtc_overrides/webrtc/base/logging.h',
113 ],
kjellandera8a7ef62016-04-05 08:13:31 -0700114 }, {
115 'sources': [
Tommi23edcff2015-05-25 10:45:43 +0200116 'logging.cc',
117 'logging.h',
Tommi09ca02e2016-04-24 17:32:48 +0200118 'logging_mac.mm',
Noah Richards915590e2015-04-22 15:43:08 -0700119 ],
tommic06b1332016-05-14 11:31:40 -0700120 'conditions': [
121 ['build_libevent==1', {
122 'dependencies': [
123 '<(DEPTH)/base/third_party/libevent/libevent.gyp:libevent',
124 ],
125 }],
126 ],
127 }],
128 ['build_libevent!=1', {
129 'sources!': [ 'task_queue_libevent.cc' ],
130 'conditions': [
131 ['OS=="linux" or OS=="android"', {
132 'sources!': [ 'task_queue_posix.cc' ],
133 }],
134 ],
135 }],
136 ['build_libevent==1 or OS=="linux" or OS=="android" or OS=="win"', {
137 'sources!': [ 'task_queue_gcd.cc' ],
Noah Richards915590e2015-04-22 15:43:08 -0700138 }],
Tommi09ca02e2016-04-24 17:32:48 +0200139 ['OS=="mac" and build_with_chromium==0', {
140 'all_dependent_settings': {
141 'xcode_settings': {
142 'OTHER_LDFLAGS': [
143 # needed for logging_mac.mm
144 '-framework Foundation',
145 ],
146 },
147 },
148 }], # OS=="mac" and build_with_chromium==0
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000149 ],
150 },
151 {
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +0000152 'target_name': 'rtc_base',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000153 'type': 'static_library',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000154 'dependencies': [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000155 '<(webrtc_root)/common.gyp:webrtc_common',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000156 'rtc_base_approved',
157 ],
jbroman5584bf42016-01-12 09:46:55 -0800158 'export_dependent_settings': [
159 'rtc_base_approved',
160 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000161 'defines': [
162 'FEATURE_ENABLE_SSL',
torbjorng07d09362015-09-22 11:58:04 -0700163 'SSL_USE_OPENSSL',
164 'HAVE_OPENSSL_SSL_H',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000165 'LOGGING=1',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000166 ],
167 'sources': [
pkasting@chromium.orge7a4a122015-01-28 21:36:55 +0000168 'arraysize.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000169 'asyncfile.cc',
170 'asyncfile.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000171 'asyncinvoker.cc',
172 'asyncinvoker.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000173 'asyncinvoker-inl.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000174 'asyncpacketsocket.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000175 'asyncpacketsocket.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000176 'asyncresolverinterface.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000177 'asyncresolverinterface.h',
178 'asyncsocket.cc',
179 'asyncsocket.h',
180 'asynctcpsocket.cc',
181 'asynctcpsocket.h',
182 'asyncudpsocket.cc',
183 'asyncudpsocket.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000184 'autodetectproxy.cc',
185 'autodetectproxy.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000186 'base64.cc',
187 'base64.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000188 'common.cc',
189 'common.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000190 'crc32.cc',
191 'crc32.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000192 'cryptstring.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000193 'cryptstring.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000194 'diskcache.cc',
195 'diskcache.h',
tkchin93411912015-07-22 12:12:17 -0700196 'filerotatingstream.cc',
197 'filerotatingstream.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000198 'fileutils.cc',
199 'fileutils.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000200 'firewallsocketserver.cc',
201 'firewallsocketserver.h',
202 'flags.cc',
203 'flags.h',
pkasting@chromium.org4591fbd2014-11-20 22:28:14 +0000204 'format_macros.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000205 'gunit_prod.h',
206 'helpers.cc',
207 'helpers.h',
208 'httpbase.cc',
209 'httpbase.h',
210 'httpclient.cc',
211 'httpclient.h',
212 'httpcommon-inl.h',
213 'httpcommon.cc',
214 'httpcommon.h',
215 'httprequest.cc',
216 'httprequest.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000217 'iosfilesystem.mm',
218 'ipaddress.cc',
219 'ipaddress.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000220 'linked_ptr.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000221 'messagedigest.cc',
222 'messagedigest.h',
223 'messagehandler.cc',
224 'messagehandler.h',
225 'messagequeue.cc',
226 'messagequeue.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000227 'nethelpers.cc',
228 'nethelpers.h',
229 'network.cc',
230 'network.h',
honghaiz023f3ef2015-10-19 09:39:32 -0700231 'networkmonitor.cc',
232 'networkmonitor.h',
danilchapbebf54c2016-04-28 01:32:48 -0700233 'nullsocketserver.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000234 'nullsocketserver.h',
torbjorng07d09362015-09-22 11:58:04 -0700235 'openssl.h',
236 'openssladapter.cc',
237 'openssladapter.h',
238 'openssldigest.cc',
239 'openssldigest.h',
240 'opensslidentity.cc',
241 'opensslidentity.h',
242 'opensslstreamadapter.cc',
243 'opensslstreamadapter.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000244 'pathutils.cc',
245 'pathutils.h',
246 'physicalsocketserver.cc',
247 'physicalsocketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000248 'proxydetect.cc',
249 'proxydetect.h',
250 'proxyinfo.cc',
251 'proxyinfo.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000252 'ratelimiter.cc',
253 'ratelimiter.h',
Henrik Boström41b3a382015-08-20 12:15:54 +0200254 'rtccertificate.cc',
255 'rtccertificate.h',
Henrik Boströmda3a1da2016-04-15 17:55:21 +0200256 'rtccertificategenerator.cc',
257 'rtccertificategenerator.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000258 'sha1.cc',
259 'sha1.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000260 'sha1digest.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000261 'sha1digest.h',
tommi@webrtc.orgfe196992015-02-07 22:35:54 +0000262 'sharedexclusivelock.cc',
263 'sharedexclusivelock.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000264 'signalthread.cc',
265 'signalthread.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000266 'sigslot.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000267 'sigslot.h',
268 'sigslotrepeater.h',
269 'socket.h',
270 'socketadapters.cc',
271 'socketadapters.h',
272 'socketaddress.cc',
273 'socketaddress.h',
274 'socketaddresspair.cc',
275 'socketaddresspair.h',
276 'socketfactory.h',
277 'socketpool.cc',
278 'socketpool.h',
279 'socketserver.h',
280 'socketstream.cc',
281 'socketstream.h',
282 'ssladapter.cc',
283 'ssladapter.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000284 'sslfingerprint.cc',
285 'sslfingerprint.h',
286 'sslidentity.cc',
287 'sslidentity.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000288 'sslsocketfactory.cc',
289 'sslsocketfactory.h',
290 'sslstreamadapter.cc',
291 'sslstreamadapter.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000292 'stream.cc',
293 'stream.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000294 'task.cc',
295 'task.h',
296 'taskparent.cc',
297 'taskparent.h',
298 'taskrunner.cc',
299 'taskrunner.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000300 'thread.cc',
301 'thread.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000302 'timing.cc',
303 'timing.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000304 'urlencode.cc',
305 'urlencode.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000306 'worker.cc',
307 'worker.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000308 ],
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +0000309 # TODO(henrike): issue 3307, make rtc_base build without disabling
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000310 # these flags.
311 'cflags!': [
312 '-Wextra',
313 '-Wall',
314 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000315 'direct_dependent_settings': {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000316 'defines': [
317 'FEATURE_ENABLE_SSL',
torbjorng07d09362015-09-22 11:58:04 -0700318 'SSL_USE_OPENSSL',
319 'HAVE_OPENSSL_SSL_H',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000320 ],
321 },
322 'include_dirs': [
323 '../../third_party/jsoncpp/overrides/include',
324 '../../third_party/jsoncpp/source/include',
325 ],
326 'conditions': [
327 ['build_with_chromium==1', {
328 'include_dirs': [
henrikgee2bf412015-09-30 03:48:52 -0700329 '../../webrtc_overrides',
henrike@webrtc.org6ac22e62014-08-11 21:06:30 +0000330 '../../boringssl/src/include',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000331 ],
kjellandera8a7ef62016-04-05 08:13:31 -0700332 'conditions': [
333 ['OS=="win"', {
334 'sources': [
335 '../../webrtc_overrides/webrtc/base/win32socketinit.cc',
336 ],
337 }],
henrikg9dff0ba2015-10-02 10:07:50 -0700338 ],
kjellandera8a7ef62016-04-05 08:13:31 -0700339 'defines': [
340 'NO_MAIN_THREAD_WRAPPING',
341 ],
342 'direct_dependent_settings': {
343 'defines': [
344 'NO_MAIN_THREAD_WRAPPING',
345 ],
346 },
347 }, {
348 'sources': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000349 'bandwidthsmoother.cc',
350 'bandwidthsmoother.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000351 'callback.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000352 'fileutils_mock.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000353 'httpserver.cc',
354 'httpserver.h',
355 'json.cc',
356 'json.h',
tkchin93411912015-07-22 12:12:17 -0700357 'logsinks.cc',
358 'logsinks.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000359 'mathutils.h',
360 'multipart.cc',
361 'multipart.h',
362 'natserver.cc',
363 'natserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000364 'natsocketfactory.cc',
365 'natsocketfactory.h',
366 'nattypes.cc',
367 'nattypes.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000368 'optionsfile.cc',
369 'optionsfile.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000370 'profiler.cc',
371 'profiler.h',
372 'proxyserver.cc',
373 'proxyserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000374 'referencecountedsingletonfactory.h',
375 'rollingaccumulator.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000376 'scopedptrcollection.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000377 'sec_buffer.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000378 'sslconfig.h',
379 'sslroots.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000380 'testbase64.h',
381 'testclient.cc',
382 'testclient.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000383 'transformadapter.cc',
384 'transformadapter.h',
385 'versionparsing.cc',
386 'versionparsing.h',
387 'virtualsocketserver.cc',
388 'virtualsocketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000389 'window.h',
kjellanderc8587ad2016-04-05 05:23:26 -0700390 'windowpicker.h',
kjellandera8a7ef62016-04-05 08:13:31 -0700391 'windowpickerfactory.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000392 ],
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000393 'conditions': [
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000394 ['build_json==1', {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000395 'dependencies': [
396 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
397 ],
398 }, {
399 'include_dirs': [
400 '<(json_root)',
401 ],
402 'defines': [
403 # When defined changes the include path for json.h to where it
404 # is expected to be when building json outside of the standalone
405 # build.
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000406 'WEBRTC_EXTERNAL_JSON',
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000407 ],
408 }],
kjellandera8a7ef62016-04-05 08:13:31 -0700409 ['OS=="linux"', {
410 'sources': [
411 'dbus.cc',
412 'dbus.h',
413 'libdbusglibsymboltable.cc',
414 'libdbusglibsymboltable.h',
415 'linuxfdwalk.c',
416 'linuxfdwalk.h',
417 ],
418 }],
419 ['os_posix==1', {
420 'sources': [
421 'latebindingsymboltable.cc',
kjellandera8a7ef62016-04-05 08:13:31 -0700422 'latebindingsymboltable.h',
kjellandera8a7ef62016-04-05 08:13:31 -0700423 'posix.cc',
424 'posix.h',
425 ],
426 }],
427 ['OS=="mac"', {
428 'sources': [
429 'macasyncsocket.cc',
430 'macasyncsocket.h',
431 'maccocoasocketserver.h',
432 'maccocoasocketserver.mm',
433 'macsocketserver.cc',
434 'macsocketserver.h',
435 'macwindowpicker.cc',
436 'macwindowpicker.h',
437 ],
438 }],
439 ['OS=="win"', {
440 'sources': [
441 'diskcache_win32.cc',
442 'diskcache_win32.h',
443 'win32regkey.cc',
444 'win32regkey.h',
445 'win32socketinit.cc',
446 'win32socketinit.h',
447 'win32socketserver.cc',
448 'win32socketserver.h',
449 ],
450 }],
kjellander7cae30c2015-12-16 14:05:29 -0800451 ['OS=="win" and clang==1', {
452 'msvs_settings': {
453 'VCCLCompilerTool': {
454 'AdditionalOptions': [
455 # Disable warnings failing when compiling with Clang on Windows.
456 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
kjellander3c85cad2016-01-19 04:47:17 -0800457 '-Wno-sign-compare',
kjellander7cae30c2015-12-16 14:05:29 -0800458 '-Wno-missing-braces',
459 ],
460 },
461 },
462 }],
kjellandera8a7ef62016-04-05 08:13:31 -0700463 ], # conditions
464 }], # build_with_chromium==0
465 ['OS=="android"', {
466 'sources': [
467 'ifaddrs-android.cc',
468 'ifaddrs-android.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000469 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000470 'link_settings': {
471 'libraries': [
472 '-llog',
473 '-lGLESv2',
474 ],
475 },
kjellandera8a7ef62016-04-05 08:13:31 -0700476 }],
477 ['OS=="mac" or OS=="ios"', {
478 'sources': [
479 'maccocoathreadhelper.h',
480 'maccocoathreadhelper.mm',
481 'macconversion.cc',
482 'macconversion.h',
483 'macifaddrs_converter.cc',
484 'scoped_autorelease_pool.h',
485 'scoped_autorelease_pool.mm',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000486 ],
487 }],
488 ['OS=="ios"', {
489 'all_dependent_settings': {
490 'xcode_settings': {
491 'OTHER_LDFLAGS': [
Zeke Chin2d3b7e22015-07-14 12:55:44 -0700492 '-framework CFNetwork',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000493 '-framework Foundation',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000494 '-framework Security',
495 '-framework SystemConfiguration',
496 '-framework UIKit',
497 ],
498 },
499 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000500 }],
kjellandera8a7ef62016-04-05 08:13:31 -0700501 ['use_x11==1', {
502 'sources': [
503 'x11windowpicker.cc',
504 'x11windowpicker.h',
505 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000506 'link_settings': {
507 'libraries': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000508 '-ldl',
509 '-lrt',
510 '-lXext',
511 '-lX11',
512 '-lXcomposite',
513 '-lXrender',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000514 ],
515 },
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000516 }],
517 ['OS=="linux"', {
518 'link_settings': {
519 'libraries': [
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000520 '-ldl',
521 '-lrt',
522 ],
523 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000524 }],
525 ['OS=="mac"', {
kjellandera8a7ef62016-04-05 08:13:31 -0700526 'sources': [
527 'macutils.cc',
528 'macutils.h',
529 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000530 'all_dependent_settings': {
531 'link_settings': {
532 'xcode_settings': {
533 'OTHER_LDFLAGS': [
534 '-framework Cocoa',
535 '-framework Foundation',
536 '-framework IOKit',
537 '-framework Security',
538 '-framework SystemConfiguration',
539 ],
540 },
541 },
542 },
543 'conditions': [
544 ['target_arch=="ia32"', {
545 'all_dependent_settings': {
546 'link_settings': {
547 'xcode_settings': {
548 'OTHER_LDFLAGS': [
549 '-framework Carbon',
550 ],
551 },
552 },
553 },
554 }],
555 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000556 }],
557 ['OS=="win"', {
kjellandera8a7ef62016-04-05 08:13:31 -0700558 'sources': [
559 'win32.cc',
560 'win32.h',
561 'win32filesystem.cc',
562 'win32filesystem.h',
563 'win32securityerrors.cc',
564 'win32window.cc',
565 'win32window.h',
566 'win32windowpicker.cc',
567 'win32windowpicker.h',
568 'winfirewall.cc',
569 'winfirewall.h',
570 'winping.cc',
571 'winping.h',
Guo-wei Shieh9faf1542015-12-28 14:06:55 -0800572 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000573 'link_settings': {
574 'libraries': [
575 '-lcrypt32.lib',
576 '-liphlpapi.lib',
577 '-lsecur32.lib',
578 ],
579 },
580 # Suppress warnings about WIN32_LEAN_AND_MEAN.
581 'msvs_disabled_warnings': [4005, 4703],
582 'defines': [
583 '_CRT_NONSTDC_NO_DEPRECATE',
584 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000585 }],
kjellandera8a7ef62016-04-05 08:13:31 -0700586 ['os_posix==1', {
587 'sources': [
588 'ifaddrs_converter.cc',
589 'ifaddrs_converter.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000590 'unixfilesystem.cc',
591 'unixfilesystem.h',
592 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000593 'configurations': {
594 'Debug_Base': {
595 'defines': [
596 # Chromium's build/common.gypi defines this for all posix
597 # _except_ for ios & mac. We want it there as well, e.g.
598 # because ASSERT and friends trigger off of it.
599 '_DEBUG',
600 ],
601 },
602 }
603 }],
604 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
605 'defines': [
606 'CARBON_DEPRECATED=YES',
607 ],
608 }],
kjellandera8a7ef62016-04-05 08:13:31 -0700609 ['OS=="linux" or OS=="android"', {
610 'sources': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000611 'linux.cc',
612 'linux.h',
613 ],
614 }],
torbjorng07d09362015-09-22 11:58:04 -0700615 ['build_ssl==1', {
616 'dependencies': [
617 '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
618 ],
619 }, {
620 'include_dirs': [
621 '<(ssl_root)',
622 ],
623 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000624 ],
625 },
kjellander988d31e2016-02-05 00:23:50 -0800626 {
627 'target_name': 'gtest_prod',
628 'type': 'static_library',
629 'sources': [
630 'gtest_prod_util.h',
631 ],
632 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000633 ],
634}