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 # TODO(henrike): make sure waterfall bots have $JAVA_HOME configured 43 # properly and remove the default value below. See issue 2113. 44 'java_home%': '<!(python -c "import os; dir=os.getenv(\'JAVA_HOME\', \'/usr/lib/jvm/java-6-sun\'); 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")', 45 }], 46 ], 47 }, 48 'target_defaults': { 49 'include_dirs': [ 50 '<(libjingle_root)', 51 '<(DEPTH)', 52 '../../third_party', 53 '../../third_party/webrtc', 54 '../../webrtc', 55 ], 56 'defines': [ 57 'EXPAT_RELATIVE_PATH', 58 'FEATURE_ENABLE_VOICEMAIL', 59 'GTEST_RELATIVE_PATH', 60 'JSONCPP_RELATIVE_PATH', 61 'LOGGING=1', 62 'SRTP_RELATIVE_PATH', 63 64 # Feature selection 65 'FEATURE_ENABLE_SSL', 66 'FEATURE_ENABLE_VOICEMAIL', 67 'FEATURE_ENABLE_PSTN', 68 'HAVE_SCTP', 69 'HAVE_SRTP', 70 'HAVE_WEBRTC_VIDEO', 71 'HAVE_WEBRTC_VOICE', 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 'WEBRTC_LINUX', 83 ], 84 'conditions': [ 85 ['clang==1', { 86 'cflags': [ 87 '-Wall', 88 '-Wextra', 89 '-Wunused-variable', 90 # TODO(ronghuawu): Fix the warning caused by 91 # LateBindingSymbolTable::TableInfo from 92 # latebindingsymboltable.cc.def and remove below flag. 93 '-Wno-address-of-array-temporary', 94 '-Wthread-safety', 95 ], 96 }], 97 ], 98 }], 99 ['OS=="mac"', { 100 'defines': [ 101 'OSX', 102 'WEBRTC_MAC', 103 ], 104 }], 105 ['OS=="win"', { 106 'defines': [ 107 'WEBRTC_WIN', 108 ], 109 'msvs_disabled_warnings': [ 110 # https://code.google.com/p/chromium/issues/detail?id=372451#c20 111 # Warning 4702 ("Unreachable code") should be re-enabled once 112 # users are updated to VS2013 Update 2. 113 4702, 114 ], 115 }], 116 ['OS=="ios"', { 117 'defines': [ 118 'IOS', 119 'WEBRTC_MAC', 120 'WEBRTC_IOS', 121 ], 122 }], 123 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', { 124 'defines': [ 125 'CARBON_DEPRECATED=YES', 126 ], 127 }], 128 ['os_posix==1', { 129 'configurations': { 130 'Debug_Base': { 131 'defines': [ 132 # Chromium's build/common.gypi defines this for all posix _except_ 133 # for ios & mac. We want it there as well, e.g. because ASSERT 134 # and friends trigger off of it. 135 '_DEBUG', 136 ], 137 }, 138 }, 139 'defines': [ 140 'HASH_NAMESPACE=__gnu_cxx', 141 'POSIX', 142 'WEBRTC_POSIX', 143 'DISABLE_DYNAMIC_CAST', 144 # The POSIX standard says we have to define this. 145 '_REENTRANT', 146 ], 147 }], 148 ], 149 }, # target_defaults 150} 151