blob: 4ee78f1c472cc8438b963e0d27dcfe73cf7a5daa [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001#
2# libjingle
jlmiller@webrtc.org5f93d0a2015-01-20 21:36:13 +00003# Copyright 2012 Google Inc.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00004#
fischman@webrtc.orge3de6b12013-08-26 19:31:21 +00005# Redistribution and use in source and binary forms, with or without
henrike@webrtc.org28e20752013-07-10 00:45:36 +00006# modification, are permitted provided that the following conditions are met:
7#
fischman@webrtc.orge3de6b12013-08-26 19:31:21 +00008# 1. Redistributions of source code must retain the above copyright notice,
henrike@webrtc.org28e20752013-07-10 00:45:36 +00009# this list of conditions and the following disclaimer.
10# 2. Redistributions in binary form must reproduce the above copyright notice,
11# this list of conditions and the following disclaimer in the documentation
12# and/or other materials provided with the distribution.
fischman@webrtc.orge3de6b12013-08-26 19:31:21 +000013# 3. The name of the author may not be used to endorse or promote products
henrike@webrtc.org28e20752013-07-10 00:45:36 +000014# derived from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
fischman@webrtc.orge3de6b12013-08-26 19:31:21 +000017# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
henrike@webrtc.org28e20752013-07-10 00:45:36 +000018# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
fischman@webrtc.orge3de6b12013-08-26 19:31:21 +000019# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
henrike@webrtc.org28e20752013-07-10 00:45:36 +000020# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
fischman@webrtc.orge3de6b12013-08-26 19:31:21 +000023# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
henrike@webrtc.org28e20752013-07-10 00:45:36 +000025# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26#
27
28# This file contains common settings for building libjingle components.
29
30{
31 'variables': {
fischman@webrtc.orgdd14b2a2013-08-12 18:06:29 +000032 'webrtc_root%': '<(DEPTH)/webrtc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000033 # TODO(ronghuawu): For now, disable the Chrome plugins, which causes a
34 # flood of chromium-style warnings.
35 'clang_use_chrome_plugins%': 0,
Henrik Kjellandere6cefb62015-04-27 14:39:04 +020036 # Disable these to not build components which can be externally provided.
Henrik Kjellandere6cefb62015-04-27 14:39:04 +020037 'build_json%': 1,
henrike@webrtc.org28e20752013-07-10 00:45:36 +000038 },
39 'target_defaults': {
40 'include_dirs': [
kjellander@webrtc.orgcf85f1c2014-03-05 00:40:33 +000041 '<(DEPTH)',
kjellander@webrtc.orge41ec812015-03-06 08:03:16 +000042 '../..',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000043 '../../third_party',
44 '../../third_party/webrtc',
henrike@webrtc.org9de257d2013-07-17 14:42:53 +000045 '../../webrtc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000046 ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +000047 'conditions': [
henrike@webrtc.org28e20752013-07-10 00:45:36 +000048 ['OS=="linux"', {
49 'defines': [
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000050 'WEBRTC_LINUX',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000051 ],
Henrik Kjellander4cd69402015-05-15 09:10:30 +020052 # Remove Chromium's disabling of the -Wformat warning.
53 'cflags!': [
54 '-Wno-format',
55 ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +000056 'conditions': [
57 ['clang==1', {
58 'cflags': [
pbos@webrtc.org174a6742014-06-02 07:58:30 +000059 '-Wall',
60 '-Wextra',
Henrik Kjellander4cd69402015-05-15 09:10:30 +020061 '-Wformat',
62 '-Wformat-security',
Henrik Kjellander7c027b62015-04-22 13:21:30 +020063 '-Wimplicit-fallthrough',
64 '-Wmissing-braces',
65 '-Wreorder',
pbos@webrtc.org174a6742014-06-02 07:58:30 +000066 '-Wunused-variable',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000067 # TODO(ronghuawu): Fix the warning caused by
68 # LateBindingSymbolTable::TableInfo from
69 # latebindingsymboltable.cc.def and remove below flag.
70 '-Wno-address-of-array-temporary',
pbos@webrtc.orgd60d79a2014-09-24 07:10:57 +000071 '-Wthread-safety',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000072 ],
Henrik Kjellander24d44852015-04-23 14:51:18 +020073 'cflags_cc': [
74 '-Wunused-private-field',
75 ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +000076 }],
77 ],
78 }],
79 ['OS=="mac"', {
80 'defines': [
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000081 'WEBRTC_MAC',
82 ],
83 }],
84 ['OS=="win"', {
85 'defines': [
86 'WEBRTC_WIN',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000087 ],
fbarchard@google.com48305f52014-07-30 00:16:20 +000088 'msvs_disabled_warnings': [
89 # https://code.google.com/p/chromium/issues/detail?id=372451#c20
90 # Warning 4702 ("Unreachable code") should be re-enabled once
91 # users are updated to VS2013 Update 2.
92 4702,
93 ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +000094 }],
95 ['OS=="ios"', {
96 'defines': [
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000097 'WEBRTC_MAC',
98 'WEBRTC_IOS',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000099 ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000100 }],
fischman@webrtc.orge3de6b12013-08-26 19:31:21 +0000101 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
henrike@webrtc.org723d6832013-07-12 16:04:50 +0000102 'defines': [
103 'CARBON_DEPRECATED=YES',
104 ],
105 }],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000106 ['os_posix==1', {
fischman@webrtc.orgb25576a2014-03-26 21:53:47 +0000107 'configurations': {
108 'Debug_Base': {
109 'defines': [
110 # Chromium's build/common.gypi defines this for all posix _except_
111 # for ios & mac. We want it there as well, e.g. because ASSERT
112 # and friends trigger off of it.
113 '_DEBUG',
114 ],
115 },
116 },
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000117 'defines': [
118 'HASH_NAMESPACE=__gnu_cxx',
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +0000119 'WEBRTC_POSIX',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000120 'DISABLE_DYNAMIC_CAST',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000121 # The POSIX standard says we have to define this.
122 '_REENTRANT',
123 ],
124 }],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000125 ],
126 }, # target_defaults
127}