blob: 1e9df348b24d08086c4ba512ad35e1938d1b7dce [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001#
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': {
henrike@webrtc.org9de257d2013-07-17 14:42:53 +000032 'webrtc_root%': '<(DEPTH)/webrtc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000033 # TODO(ronghuawu): Chromium build will need a different libjingle_root.
34 'libjingle_root%': '<(DEPTH)',
35 # TODO(ronghuawu): For now, disable the Chrome plugins, which causes a
36 # flood of chromium-style warnings.
37 'clang_use_chrome_plugins%': 0,
38 'libpeer_target_type%': 'static_library',
henrike@webrtc.org28654cb2013-07-22 21:07:49 +000039 # TODO(henrike): make sure waterfall bots have $JAVA_HOME configured
40 # properly and remove the default value below. See issue 2113.
41 'java_home%': '<!(python -c "import os; print os.getenv(\'JAVA_HOME\', \'/usr/lib/jvm/java-6-sun\');")',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000042 # Whether or not to build the ObjectiveC PeerConnection API & tests.
43 'libjingle_objc%' : 0,
44 },
45 'target_defaults': {
46 'include_dirs': [
47 '../..',
48 '../../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',
64 # TODO(eric): enable HAVE_NSS_SSL_H and SSL_USE_NSS once they are ready.
65 # 'HAVE_NSS_SSL_H=1',
66 'HAVE_SRTP',
67 'HAVE_WEBRTC_VIDEO',
68 'HAVE_WEBRTC_VOICE',
69 # 'SSL_USE_NSS',
70 # TODO(ronghuawu): Remove this once libjingle is updated to use the new
71 # webrtc.
72 'USE_WEBRTC_DEV_BRANCH',
73 ],
74 'conditions': [
75 # TODO(ronghuawu): Support dynamic library build.
76 ['"<(libpeer_target_type)"=="static_library"', {
77 'defines': [ 'LIBPEERCONNECTION_LIB=1' ],
78 }],
79 ['OS=="linux"', {
80 'defines': [
81 'LINUX',
82 ],
83 'conditions': [
84 ['clang==1', {
85 'cflags': [
86 # TODO(ronghuawu): Fix the warning caused by
87 # LateBindingSymbolTable::TableInfo from
88 # latebindingsymboltable.cc.def and remove below flag.
89 '-Wno-address-of-array-temporary',
90 ],
91 }],
92 ],
93 }],
94 ['OS=="mac"', {
95 'defines': [
96 'OSX',
97 ],
98 }],
99 ['OS=="ios"', {
100 'defines': [
101 'IOS',
102 'SSL_USE_NSS',
103 'SSL_USE_NSS_RNG',
104 ],
105 'variables': {
106 'use_nss%': 1,
107 },
108 }],
henrike@webrtc.org723d6832013-07-12 16:04:50 +0000109 ['libjingle_objc==1', {
110 'defines': [
111 'CARBON_DEPRECATED=YES',
112 ],
113 }],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000114 ['os_posix==1', {
115 'defines': [
116 'HASH_NAMESPACE=__gnu_cxx',
117 'POSIX',
118 'DISABLE_DYNAMIC_CAST',
119 'HAVE_OPENSSL_SSL_H=1',
120 # The POSIX standard says we have to define this.
121 '_REENTRANT',
122 ],
123 }],
124 ],
125 }, # target_defaults
126}