henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | # |
| 2 | # libjingle |
jlmiller@webrtc.org | 5f93d0a | 2015-01-20 21:36:13 +0000 | [diff] [blame] | 3 | # Copyright 2012 Google Inc. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 4 | # |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 5 | # Redistribution and use in source and binary forms, with or without |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 6 | # modification, are permitted provided that the following conditions are met: |
| 7 | # |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 8 | # 1. Redistributions of source code must retain the above copyright notice, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 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. |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 13 | # 3. The name of the author may not be used to endorse or promote products |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 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 |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 18 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 19 | # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 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, |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 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 |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 25 | # 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.org | dd14b2a | 2013-08-12 18:06:29 +0000 | [diff] [blame] | 32 | 'webrtc_root%': '<(DEPTH)/webrtc', |
buildbot@webrtc.org | 55535d4 | 2014-07-08 18:18:55 +0000 | [diff] [blame] | 33 | 'libjingle_tests_additional_deps%': [], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 34 | # 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.org | dd14b2a | 2013-08-12 18:06:29 +0000 | [diff] [blame] | 38 | 'conditions': [ |
| 39 | ['OS=="android" or OS=="linux"', { |
kjellander@webrtc.org | c2c94a9 | 2014-10-31 19:01:41 +0000 | [diff] [blame] | 40 | '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.org | dd14b2a | 2013-08-12 18:06:29 +0000 | [diff] [blame] | 41 | }], |
| 42 | ], |
Henrik Kjellander | e6cefb6 | 2015-04-27 14:39:04 +0200 | [diff] [blame^] | 43 | # Disable these to not build components which can be externally provided. |
| 44 | 'build_expat%': 1, |
| 45 | 'build_icu%': 1, |
| 46 | 'build_json%': 1, |
| 47 | 'build_libsrtp%': 1, |
| 48 | 'build_libyuv%': 1, |
| 49 | 'build_usrsctp%': 1, |
| 50 | # Make it possible to provide custom locations for some libraries. |
| 51 | 'libyuv_dir%': '<(DEPTH)/third_party/libyuv', |
| 52 | |
| 53 | # Disable this to skip building source requiring GTK. |
| 54 | 'use_gtk%': 1, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 55 | }, |
| 56 | 'target_defaults': { |
| 57 | 'include_dirs': [ |
kjellander@webrtc.org | cf85f1c | 2014-03-05 00:40:33 +0000 | [diff] [blame] | 58 | '<(DEPTH)', |
kjellander@webrtc.org | e41ec81 | 2015-03-06 08:03:16 +0000 | [diff] [blame] | 59 | '../..', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 60 | '../../third_party', |
| 61 | '../../third_party/webrtc', |
henrike@webrtc.org | 9de257d | 2013-07-17 14:42:53 +0000 | [diff] [blame] | 62 | '../../webrtc', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 63 | ], |
| 64 | 'defines': [ |
| 65 | 'EXPAT_RELATIVE_PATH', |
| 66 | 'FEATURE_ENABLE_VOICEMAIL', |
| 67 | 'GTEST_RELATIVE_PATH', |
| 68 | 'JSONCPP_RELATIVE_PATH', |
| 69 | 'LOGGING=1', |
| 70 | 'SRTP_RELATIVE_PATH', |
| 71 | |
| 72 | # Feature selection |
| 73 | 'FEATURE_ENABLE_SSL', |
| 74 | 'FEATURE_ENABLE_VOICEMAIL', |
| 75 | 'FEATURE_ENABLE_PSTN', |
tkchin@webrtc.org | b038c72 | 2014-07-14 20:24:09 +0000 | [diff] [blame] | 76 | 'HAVE_SCTP', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 77 | 'HAVE_SRTP', |
| 78 | 'HAVE_WEBRTC_VIDEO', |
| 79 | 'HAVE_WEBRTC_VOICE', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 80 | ], |
| 81 | 'conditions': [ |
| 82 | # TODO(ronghuawu): Support dynamic library build. |
| 83 | ['"<(libpeer_target_type)"=="static_library"', { |
| 84 | 'defines': [ 'LIBPEERCONNECTION_LIB=1' ], |
| 85 | }], |
| 86 | ['OS=="linux"', { |
| 87 | 'defines': [ |
| 88 | 'LINUX', |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 89 | 'WEBRTC_LINUX', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 90 | ], |
| 91 | 'conditions': [ |
| 92 | ['clang==1', { |
| 93 | 'cflags': [ |
pbos@webrtc.org | 174a674 | 2014-06-02 07:58:30 +0000 | [diff] [blame] | 94 | '-Wall', |
| 95 | '-Wextra', |
Henrik Kjellander | 7c027b6 | 2015-04-22 13:21:30 +0200 | [diff] [blame] | 96 | '-Wimplicit-fallthrough', |
| 97 | '-Wmissing-braces', |
| 98 | '-Wreorder', |
pbos@webrtc.org | 174a674 | 2014-06-02 07:58:30 +0000 | [diff] [blame] | 99 | '-Wunused-variable', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 100 | # TODO(ronghuawu): Fix the warning caused by |
| 101 | # LateBindingSymbolTable::TableInfo from |
| 102 | # latebindingsymboltable.cc.def and remove below flag. |
| 103 | '-Wno-address-of-array-temporary', |
pbos@webrtc.org | d60d79a | 2014-09-24 07:10:57 +0000 | [diff] [blame] | 104 | '-Wthread-safety', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 105 | ], |
Henrik Kjellander | 24d4485 | 2015-04-23 14:51:18 +0200 | [diff] [blame] | 106 | 'cflags_cc': [ |
| 107 | '-Wunused-private-field', |
| 108 | ], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 109 | }], |
| 110 | ], |
| 111 | }], |
| 112 | ['OS=="mac"', { |
| 113 | 'defines': [ |
| 114 | 'OSX', |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 115 | 'WEBRTC_MAC', |
| 116 | ], |
| 117 | }], |
| 118 | ['OS=="win"', { |
| 119 | 'defines': [ |
| 120 | 'WEBRTC_WIN', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 121 | ], |
fbarchard@google.com | 48305f5 | 2014-07-30 00:16:20 +0000 | [diff] [blame] | 122 | 'msvs_disabled_warnings': [ |
| 123 | # https://code.google.com/p/chromium/issues/detail?id=372451#c20 |
| 124 | # Warning 4702 ("Unreachable code") should be re-enabled once |
| 125 | # users are updated to VS2013 Update 2. |
| 126 | 4702, |
| 127 | ], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 128 | }], |
| 129 | ['OS=="ios"', { |
| 130 | 'defines': [ |
| 131 | 'IOS', |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 132 | 'WEBRTC_MAC', |
| 133 | 'WEBRTC_IOS', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 134 | ], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 135 | }], |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 136 | ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', { |
henrike@webrtc.org | 723d683 | 2013-07-12 16:04:50 +0000 | [diff] [blame] | 137 | 'defines': [ |
| 138 | 'CARBON_DEPRECATED=YES', |
| 139 | ], |
| 140 | }], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 141 | ['os_posix==1', { |
fischman@webrtc.org | b25576a | 2014-03-26 21:53:47 +0000 | [diff] [blame] | 142 | 'configurations': { |
| 143 | 'Debug_Base': { |
| 144 | 'defines': [ |
| 145 | # Chromium's build/common.gypi defines this for all posix _except_ |
| 146 | # for ios & mac. We want it there as well, e.g. because ASSERT |
| 147 | # and friends trigger off of it. |
| 148 | '_DEBUG', |
| 149 | ], |
| 150 | }, |
| 151 | }, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 152 | 'defines': [ |
| 153 | 'HASH_NAMESPACE=__gnu_cxx', |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 154 | 'WEBRTC_POSIX', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 155 | 'DISABLE_DYNAMIC_CAST', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 156 | # The POSIX standard says we have to define this. |
| 157 | '_REENTRANT', |
| 158 | ], |
| 159 | }], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 160 | ], |
| 161 | }, # target_defaults |
| 162 | } |