henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 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 | # TODO(ronghuawu): Chromium build will need a different libjingle_root. |
| 33 | 'libjingle_root%': '<(DEPTH)', |
| 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', |
| 38 | 'java_home%': '<!(python -c "import os; print os.getenv(\'JAVA_HOME\');")', |
| 39 | # Whether or not to build the ObjectiveC PeerConnection API & tests. |
| 40 | 'libjingle_objc%' : 0, |
| 41 | }, |
| 42 | 'target_defaults': { |
| 43 | 'include_dirs': [ |
| 44 | '../..', |
| 45 | '../../third_party', |
| 46 | '../../third_party/webrtc', |
| 47 | ], |
| 48 | 'defines': [ |
| 49 | 'EXPAT_RELATIVE_PATH', |
| 50 | 'FEATURE_ENABLE_VOICEMAIL', |
| 51 | 'GTEST_RELATIVE_PATH', |
| 52 | 'JSONCPP_RELATIVE_PATH', |
| 53 | 'LOGGING=1', |
| 54 | 'SRTP_RELATIVE_PATH', |
| 55 | |
| 56 | # Feature selection |
| 57 | 'FEATURE_ENABLE_SSL', |
| 58 | 'FEATURE_ENABLE_VOICEMAIL', |
| 59 | 'FEATURE_ENABLE_PSTN', |
| 60 | # TODO(eric): enable HAVE_NSS_SSL_H and SSL_USE_NSS once they are ready. |
| 61 | # 'HAVE_NSS_SSL_H=1', |
| 62 | 'HAVE_SRTP', |
| 63 | 'HAVE_WEBRTC_VIDEO', |
| 64 | 'HAVE_WEBRTC_VOICE', |
| 65 | # 'SSL_USE_NSS', |
| 66 | # TODO(ronghuawu): Remove this once libjingle is updated to use the new |
| 67 | # webrtc. |
| 68 | 'USE_WEBRTC_DEV_BRANCH', |
| 69 | ], |
| 70 | 'conditions': [ |
| 71 | # TODO(ronghuawu): Support dynamic library build. |
| 72 | ['"<(libpeer_target_type)"=="static_library"', { |
| 73 | 'defines': [ 'LIBPEERCONNECTION_LIB=1' ], |
| 74 | }], |
| 75 | ['OS=="linux"', { |
| 76 | 'defines': [ |
| 77 | 'LINUX', |
| 78 | ], |
| 79 | 'conditions': [ |
| 80 | ['clang==1', { |
| 81 | 'cflags': [ |
| 82 | # TODO(ronghuawu): Fix the warning caused by |
| 83 | # LateBindingSymbolTable::TableInfo from |
| 84 | # latebindingsymboltable.cc.def and remove below flag. |
| 85 | '-Wno-address-of-array-temporary', |
| 86 | ], |
| 87 | }], |
| 88 | ], |
| 89 | }], |
| 90 | ['OS=="mac"', { |
| 91 | 'defines': [ |
| 92 | 'OSX', |
| 93 | ], |
| 94 | }], |
| 95 | ['OS=="ios"', { |
| 96 | 'defines': [ |
| 97 | 'IOS', |
| 98 | 'SSL_USE_NSS', |
| 99 | 'SSL_USE_NSS_RNG', |
| 100 | ], |
| 101 | 'variables': { |
| 102 | 'use_nss%': 1, |
| 103 | }, |
| 104 | }], |
henrike@webrtc.org | 723d683 | 2013-07-12 16:04:50 +0000 | [diff] [blame^] | 105 | ['libjingle_objc==1', { |
| 106 | 'defines': [ |
| 107 | 'CARBON_DEPRECATED=YES', |
| 108 | ], |
| 109 | }], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 110 | ['os_posix==1', { |
| 111 | 'defines': [ |
| 112 | 'HASH_NAMESPACE=__gnu_cxx', |
| 113 | 'POSIX', |
| 114 | 'DISABLE_DYNAMIC_CAST', |
| 115 | 'HAVE_OPENSSL_SSL_H=1', |
| 116 | # The POSIX standard says we have to define this. |
| 117 | '_REENTRANT', |
| 118 | ], |
| 119 | }], |
| 120 | ], |
| 121 | }, # target_defaults |
| 122 | } |