henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | # |
| 2 | # libjingle |
| 3 | # Copyright 2012, Google Inc. |
| 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', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 33 | # 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', |
fischman@webrtc.org | dd14b2a | 2013-08-12 18:06:29 +0000 | [diff] [blame] | 39 | 'conditions': [ |
| 40 | ['OS=="android" or OS=="linux"', { |
| 41 | # TODO(henrike): make sure waterfall bots have $JAVA_HOME configured |
| 42 | # properly and remove the default value below. See issue 2113. |
| 43 | '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")', |
| 44 | }], |
| 45 | ], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 46 | }, |
| 47 | 'target_defaults': { |
| 48 | 'include_dirs': [ |
| 49 | '../..', |
| 50 | '../../third_party', |
| 51 | '../../third_party/webrtc', |
henrike@webrtc.org | 9de257d | 2013-07-17 14:42:53 +0000 | [diff] [blame] | 52 | '../../webrtc', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 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 | # TODO(eric): enable HAVE_NSS_SSL_H and SSL_USE_NSS once they are ready. |
| 67 | # 'HAVE_NSS_SSL_H=1', |
| 68 | 'HAVE_SRTP', |
| 69 | 'HAVE_WEBRTC_VIDEO', |
| 70 | 'HAVE_WEBRTC_VOICE', |
| 71 | # 'SSL_USE_NSS', |
| 72 | # TODO(ronghuawu): Remove this once libjingle is updated to use the new |
| 73 | # webrtc. |
| 74 | 'USE_WEBRTC_DEV_BRANCH', |
| 75 | ], |
| 76 | 'conditions': [ |
| 77 | # TODO(ronghuawu): Support dynamic library build. |
| 78 | ['"<(libpeer_target_type)"=="static_library"', { |
| 79 | 'defines': [ 'LIBPEERCONNECTION_LIB=1' ], |
| 80 | }], |
| 81 | ['OS=="linux"', { |
| 82 | 'defines': [ |
| 83 | 'LINUX', |
| 84 | ], |
| 85 | 'conditions': [ |
| 86 | ['clang==1', { |
| 87 | 'cflags': [ |
| 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 | ], |
| 93 | }], |
| 94 | ], |
| 95 | }], |
| 96 | ['OS=="mac"', { |
| 97 | 'defines': [ |
| 98 | 'OSX', |
| 99 | ], |
| 100 | }], |
| 101 | ['OS=="ios"', { |
| 102 | 'defines': [ |
| 103 | 'IOS', |
fischman@webrtc.org | 1bc1954 | 2013-08-01 18:29:45 +0000 | [diff] [blame] | 104 | 'HAVE_NSS_SSL_H=1', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 105 | 'SSL_USE_NSS_RNG', |
| 106 | ], |
fischman@webrtc.org | 1bc1954 | 2013-08-01 18:29:45 +0000 | [diff] [blame] | 107 | 'defines!': [ |
| 108 | 'HAVE_OPENSSL_SSL_H=1', |
| 109 | ], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 110 | }], |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame^] | 111 | ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', { |
henrike@webrtc.org | 723d683 | 2013-07-12 16:04:50 +0000 | [diff] [blame] | 112 | 'defines': [ |
| 113 | 'CARBON_DEPRECATED=YES', |
| 114 | ], |
| 115 | }], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 116 | ['os_posix==1', { |
| 117 | 'defines': [ |
| 118 | 'HASH_NAMESPACE=__gnu_cxx', |
| 119 | 'POSIX', |
| 120 | 'DISABLE_DYNAMIC_CAST', |
| 121 | 'HAVE_OPENSSL_SSL_H=1', |
| 122 | # The POSIX standard says we have to define this. |
| 123 | '_REENTRANT', |
| 124 | ], |
| 125 | }], |
| 126 | ], |
| 127 | }, # target_defaults |
| 128 | } |