blob: f2322b1ac802873fb42b644b964cef75585b3939 [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',
39 'java_home%': '<!(python -c "import os; print os.getenv(\'JAVA_HOME\');")',
40 # Whether or not to build the ObjectiveC PeerConnection API & tests.
41 'libjingle_objc%' : 0,
42 },
43 'target_defaults': {
44 'include_dirs': [
45 '../..',
46 '../../third_party',
47 '../../third_party/webrtc',
henrike@webrtc.org9de257d2013-07-17 14:42:53 +000048 '../../webrtc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000049 ],
50 'defines': [
51 'EXPAT_RELATIVE_PATH',
52 'FEATURE_ENABLE_VOICEMAIL',
53 'GTEST_RELATIVE_PATH',
54 'JSONCPP_RELATIVE_PATH',
55 'LOGGING=1',
56 'SRTP_RELATIVE_PATH',
57
58 # Feature selection
59 'FEATURE_ENABLE_SSL',
60 'FEATURE_ENABLE_VOICEMAIL',
61 'FEATURE_ENABLE_PSTN',
62 # TODO(eric): enable HAVE_NSS_SSL_H and SSL_USE_NSS once they are ready.
63 # 'HAVE_NSS_SSL_H=1',
64 'HAVE_SRTP',
65 'HAVE_WEBRTC_VIDEO',
66 'HAVE_WEBRTC_VOICE',
67 # 'SSL_USE_NSS',
68 # TODO(ronghuawu): Remove this once libjingle is updated to use the new
69 # webrtc.
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 ],
81 'conditions': [
82 ['clang==1', {
83 'cflags': [
84 # TODO(ronghuawu): Fix the warning caused by
85 # LateBindingSymbolTable::TableInfo from
86 # latebindingsymboltable.cc.def and remove below flag.
87 '-Wno-address-of-array-temporary',
88 ],
89 }],
90 ],
91 }],
92 ['OS=="mac"', {
93 'defines': [
94 'OSX',
95 ],
96 }],
97 ['OS=="ios"', {
98 'defines': [
99 'IOS',
100 'SSL_USE_NSS',
101 'SSL_USE_NSS_RNG',
102 ],
103 'variables': {
104 'use_nss%': 1,
105 },
106 }],
henrike@webrtc.org723d6832013-07-12 16:04:50 +0000107 ['libjingle_objc==1', {
108 'defines': [
109 'CARBON_DEPRECATED=YES',
110 ],
111 }],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000112 ['os_posix==1', {
113 'defines': [
114 'HASH_NAMESPACE=__gnu_cxx',
115 'POSIX',
116 'DISABLE_DYNAMIC_CAST',
117 'HAVE_OPENSSL_SSL_H=1',
118 # The POSIX standard says we have to define this.
119 '_REENTRANT',
120 ],
121 }],
122 ],
123 }, # target_defaults
124}