blob: 2d6fca09498c86e88c8ef12041dc546f2bf94bb4 [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',
buildbot@webrtc.org55535d42014-07-08 18:18:55 +000033 'libjingle_tests_additional_deps%': [],
henrike@webrtc.org28e20752013-07-10 00:45:36 +000034 # TODO(ronghuawu): For now, disable the Chrome plugins, which causes a
35 # flood of chromium-style warnings.
36 'clang_use_chrome_plugins%': 0,
37 'libpeer_target_type%': 'static_library',
fischman@webrtc.orgdd14b2a2013-08-12 18:06:29 +000038 'conditions': [
39 ['OS=="android" or OS=="linux"', {
kjellander@webrtc.orgc2c94a92014-10-31 19:01:41 +000040 'java_home%': '<!(python -c "import os; dir=os.getenv(\'JAVA_HOME\', \'/usr/lib/jvm/java-7-openjdk-amd64\'); assert os.path.exists(os.path.join(dir, \'include/jni.h\')), \'Point \\$JAVA_HOME or the java_home gyp variable to a directory containing include/jni.h!\'; print dir")',
fischman@webrtc.orgdd14b2a2013-08-12 18:06:29 +000041 }],
42 ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +000043 },
44 'target_defaults': {
45 'include_dirs': [
kjellander@webrtc.orgcf85f1c2014-03-05 00:40:33 +000046 '<(DEPTH)',
kjellander@webrtc.orge41ec812015-03-06 08:03:16 +000047 '../..',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000048 '../../third_party',
49 '../../third_party/webrtc',
henrike@webrtc.org9de257d2013-07-17 14:42:53 +000050 '../../webrtc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000051 ],
52 'defines': [
53 'EXPAT_RELATIVE_PATH',
54 'FEATURE_ENABLE_VOICEMAIL',
55 'GTEST_RELATIVE_PATH',
56 'JSONCPP_RELATIVE_PATH',
57 'LOGGING=1',
58 'SRTP_RELATIVE_PATH',
59
60 # Feature selection
61 'FEATURE_ENABLE_SSL',
62 'FEATURE_ENABLE_VOICEMAIL',
63 'FEATURE_ENABLE_PSTN',
tkchin@webrtc.orgb038c722014-07-14 20:24:09 +000064 'HAVE_SCTP',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000065 'HAVE_SRTP',
66 'HAVE_WEBRTC_VIDEO',
67 'HAVE_WEBRTC_VOICE',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000068 ],
69 'conditions': [
70 # TODO(ronghuawu): Support dynamic library build.
71 ['"<(libpeer_target_type)"=="static_library"', {
72 'defines': [ 'LIBPEERCONNECTION_LIB=1' ],
73 }],
74 ['OS=="linux"', {
75 'defines': [
76 'LINUX',
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000077 'WEBRTC_LINUX',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000078 ],
79 'conditions': [
80 ['clang==1', {
81 'cflags': [
pbos@webrtc.org174a6742014-06-02 07:58:30 +000082 '-Wall',
83 '-Wextra',
Henrik Kjellander7c027b62015-04-22 13:21:30 +020084 '-Wimplicit-fallthrough',
85 '-Wmissing-braces',
86 '-Wreorder',
pbos@webrtc.org174a6742014-06-02 07:58:30 +000087 '-Wunused-variable',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000088 # TODO(ronghuawu): Fix the warning caused by
89 # LateBindingSymbolTable::TableInfo from
90 # latebindingsymboltable.cc.def and remove below flag.
91 '-Wno-address-of-array-temporary',
pbos@webrtc.orgd60d79a2014-09-24 07:10:57 +000092 '-Wthread-safety',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000093 ],
Henrik Kjellander24d44852015-04-23 14:51:18 +020094 'cflags_cc': [
95 '-Wunused-private-field',
96 ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +000097 }],
98 ],
99 }],
100 ['OS=="mac"', {
101 'defines': [
102 'OSX',
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +0000103 'WEBRTC_MAC',
104 ],
105 }],
106 ['OS=="win"', {
107 'defines': [
108 'WEBRTC_WIN',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000109 ],
fbarchard@google.com48305f52014-07-30 00:16:20 +0000110 'msvs_disabled_warnings': [
111 # https://code.google.com/p/chromium/issues/detail?id=372451#c20
112 # Warning 4702 ("Unreachable code") should be re-enabled once
113 # users are updated to VS2013 Update 2.
114 4702,
115 ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000116 }],
117 ['OS=="ios"', {
118 'defines': [
119 'IOS',
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +0000120 'WEBRTC_MAC',
121 'WEBRTC_IOS',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000122 ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000123 }],
fischman@webrtc.orge3de6b12013-08-26 19:31:21 +0000124 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
henrike@webrtc.org723d6832013-07-12 16:04:50 +0000125 'defines': [
126 'CARBON_DEPRECATED=YES',
127 ],
128 }],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000129 ['os_posix==1', {
fischman@webrtc.orgb25576a2014-03-26 21:53:47 +0000130 'configurations': {
131 'Debug_Base': {
132 'defines': [
133 # Chromium's build/common.gypi defines this for all posix _except_
134 # for ios & mac. We want it there as well, e.g. because ASSERT
135 # and friends trigger off of it.
136 '_DEBUG',
137 ],
138 },
139 },
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000140 'defines': [
141 'HASH_NAMESPACE=__gnu_cxx',
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +0000142 'WEBRTC_POSIX',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000143 'DISABLE_DYNAMIC_CAST',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000144 # The POSIX standard says we have to define this.
145 '_REENTRANT',
146 ],
147 }],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000148 ],
149 }, # target_defaults
150}