Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / libjingle / source / talk / build / common.gypi
1 #
2 # libjingle
3 # Copyright 2012, Google Inc.
4 #
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are met:
7 #
8 #  1. Redistributions of source code must retain the above copyright notice,
9 #     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.
13 #  3. The name of the author may not be used to endorse or promote products
14 #     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
17 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19 # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 # 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,
23 # 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
25 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #
27
28 # This file contains common settings for building libjingle components.
29
30 {
31   'variables': {
32     'webrtc_root%': '<(DEPTH)/webrtc',
33     # TODO(ronghuawu): Chromium build will need a different libjingle_root.
34     'libjingle_tests_additional_deps%': [],
35     'libjingle_root%': '<(DEPTH)',
36     # TODO(ronghuawu): For now, disable the Chrome plugins, which causes a
37     # flood of chromium-style warnings.
38     'clang_use_chrome_plugins%': 0,
39     'libpeer_target_type%': 'static_library',
40     'conditions': [
41       ['OS=="android" or OS=="linux"', {
42         '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")',
43       }],
44     ],
45   },
46   'target_defaults': {
47     'include_dirs': [
48       '<(libjingle_root)',
49       '<(DEPTH)',
50       '../../third_party',
51       '../../third_party/webrtc',
52       '../../webrtc',
53     ],
54     'defines': [
55       'EXPAT_RELATIVE_PATH',
56       'FEATURE_ENABLE_VOICEMAIL',
57       'GTEST_RELATIVE_PATH',
58       'JSONCPP_RELATIVE_PATH',
59       'LOGGING=1',
60       'SRTP_RELATIVE_PATH',
61
62       # Feature selection
63       'FEATURE_ENABLE_SSL',
64       'FEATURE_ENABLE_VOICEMAIL',
65       'FEATURE_ENABLE_PSTN',
66       'HAVE_SCTP',
67       'HAVE_SRTP',
68       'HAVE_WEBRTC_VIDEO',
69       'HAVE_WEBRTC_VOICE',
70       'USE_WEBRTC_DEV_BRANCH',
71     ],
72     'conditions': [
73       # TODO(ronghuawu): Support dynamic library build.
74       ['"<(libpeer_target_type)"=="static_library"', {
75         'defines': [ 'LIBPEERCONNECTION_LIB=1' ],
76       }],
77       ['OS=="linux"', {
78         'defines': [
79           'LINUX',
80           'WEBRTC_LINUX',
81         ],
82         'conditions': [
83           ['clang==1', {
84             'cflags': [
85               '-Wall',
86               '-Wextra',
87               '-Wunused-variable',
88               # 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',
92               '-Wthread-safety',
93             ],
94           }],
95         ],
96       }],
97       ['OS=="mac"', {
98         'defines': [
99           'OSX',
100           'WEBRTC_MAC',
101         ],
102       }],
103       ['OS=="win"', {
104         'defines': [
105           'WEBRTC_WIN',
106         ],
107         'msvs_disabled_warnings': [
108           # https://code.google.com/p/chromium/issues/detail?id=372451#c20
109           # Warning 4702 ("Unreachable code") should be re-enabled once
110           # users are updated to VS2013 Update 2.
111             4702,
112         ],
113       }],
114       ['OS=="ios"', {
115         'defines': [
116           'IOS',
117           'WEBRTC_MAC',
118           'WEBRTC_IOS',
119         ],
120       }],
121       ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
122         'defines': [
123           'CARBON_DEPRECATED=YES',
124         ],
125       }],
126       ['os_posix==1', {
127         'configurations': {
128           'Debug_Base': {
129             'defines': [
130               # Chromium's build/common.gypi defines this for all posix _except_
131               # for ios & mac.  We want it there as well, e.g. because ASSERT
132               # and friends trigger off of it.
133               '_DEBUG',
134             ],
135           },
136         },
137         'defines': [
138           'HASH_NAMESPACE=__gnu_cxx',
139           'POSIX',
140           'WEBRTC_POSIX',
141           'DISABLE_DYNAMIC_CAST',
142           # The POSIX standard says we have to define this.
143           '_REENTRANT',
144         ],
145       }],
146     ],
147   }, # target_defaults
148 }