| OLD | NEW |
| 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
| 4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
| 5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 # TODO(kjellander): Rebase this to webrtc/build/common.gypi changes after r6330. | 9 # TODO(kjellander): Rebase this to webrtc/build/common.gypi changes after r6330. |
| 10 | 10 |
| 11 import("//build/config/linux/pkg_config.gni") | 11 import("//build/config/linux/pkg_config.gni") |
| 12 import("//build/config/sanitizers/sanitizers.gni") | 12 import("//build/config/sanitizers/sanitizers.gni") |
| 13 import("build/webrtc.gni") | 13 import("build/webrtc.gni") |
| 14 import("//third_party/protobuf/proto_library.gni") | 14 import("//third_party/protobuf/proto_library.gni") |
| 15 | 15 |
| 16 # Contains the defines and includes in common.gypi that are duplicated both as | 16 # Contains the defines and includes in common.gypi that are duplicated both as |
| 17 # target_defaults and direct_dependent_settings. | 17 # target_defaults and direct_dependent_settings. |
| 18 config("common_inherited_config") { | 18 config("common_inherited_config") { |
| 19 defines = [] | 19 defines = [] |
| 20 if (build_with_mozilla) { | 20 if (build_with_mozilla) { |
| 21 defines += [ "WEBRTC_MOZILLA_BUILD" ] | 21 defines += [ "WEBRTC_MOZILLA_BUILD" ] |
| 22 } | 22 } |
| 23 if (build_with_chromium) { | 23 if (build_with_chromium) { |
| 24 defines = [ "WEBRTC_CHROMIUM_BUILD" ] | 24 defines = [ |
| 25 # TODO(kjellander): Cleanup unused ones and move defines closer to |
| 26 # the source when webrtc:4256 is completed. |
| 27 "FEATURE_ENABLE_SSL", |
| 28 "FEATURE_ENABLE_VOICEMAIL", |
| 29 "EXPAT_RELATIVE_PATH", |
| 30 "GTEST_RELATIVE_PATH", |
| 31 "NO_MAIN_THREAD_WRAPPING", |
| 32 "NO_SOUND_SYSTEM", |
| 33 "WEBRTC_CHROMIUM_BUILD", |
| 34 ] |
| 25 include_dirs = [ | 35 include_dirs = [ |
| 26 # The overrides must be included first as that is the mechanism for | 36 # The overrides must be included first as that is the mechanism for |
| 27 # selecting the override headers in Chromium. | 37 # selecting the override headers in Chromium. |
| 28 "../webrtc_overrides", | 38 "../webrtc_overrides", |
| 29 | 39 |
| 30 # Allow includes to be prefixed with webrtc/ in case it is not an | 40 # Allow includes to be prefixed with webrtc/ in case it is not an |
| 31 # immediate subdirectory of the top-level. | 41 # immediate subdirectory of the top-level. |
| 32 "..", | 42 "..", |
| 33 ] | 43 ] |
| 34 } | 44 } |
| 35 if (is_posix) { | 45 if (is_posix) { |
| 36 defines += [ "WEBRTC_POSIX" ] | 46 defines += [ "WEBRTC_POSIX" ] |
| 37 } | 47 } |
| 38 if (is_ios) { | 48 if (is_ios) { |
| 39 defines += [ | 49 defines += [ |
| 40 "WEBRTC_MAC", | 50 "WEBRTC_MAC", |
| 41 "WEBRTC_IOS", | 51 "WEBRTC_IOS", |
| 42 ] | 52 ] |
| 43 } | 53 } |
| 44 if (is_ios && rtc_use_objc_h264) { | 54 if (is_ios && rtc_use_objc_h264) { |
| 45 defines += [ "WEBRTC_OBJC_H264" ] | 55 defines += [ "WEBRTC_OBJC_H264" ] |
| 46 } | 56 } |
| 47 if (is_linux) { | 57 if (is_linux) { |
| 48 defines += [ "WEBRTC_LINUX" ] | 58 defines += [ "WEBRTC_LINUX" ] |
| 49 } | 59 } |
| 50 if (is_mac) { | 60 if (is_mac) { |
| 51 defines += [ "WEBRTC_MAC" ] | 61 defines += [ "WEBRTC_MAC" ] |
| 52 } | 62 } |
| 53 if (is_win) { | 63 if (is_win) { |
| 54 defines += [ "WEBRTC_WIN" ] | 64 defines += [ |
| 65 "WEBRTC_WIN", |
| 66 "_CRT_SECURE_NO_WARNINGS", # Suppress warnings about _vsnprinf |
| 67 ] |
| 55 } | 68 } |
| 56 if (is_android) { | 69 if (is_android) { |
| 57 defines += [ | 70 defines += [ |
| 58 "WEBRTC_LINUX", | 71 "WEBRTC_LINUX", |
| 59 "WEBRTC_ANDROID", | 72 "WEBRTC_ANDROID", |
| 60 ] | 73 ] |
| 61 } | 74 } |
| 75 if (is_chromeos) { |
| 76 defines += [ "CHROMEOS" ] |
| 77 } |
| 78 |
| 79 # TODO(GYP): Support these in GN. |
| 80 # if (is_bsd) { |
| 81 # defines += [ "BSD" ] |
| 82 # } |
| 83 # if (is_openbsd) { |
| 84 # defines += [ "OPENBSD" ] |
| 85 # } |
| 86 # if (is_freebsd) { |
| 87 # defines += [ "FREEBSD" ] |
| 88 # } |
| 62 } | 89 } |
| 63 | 90 |
| 64 if (rtc_have_dbus_glib) { | 91 if (rtc_have_dbus_glib) { |
| 65 pkg_config("dbus-glib") { | 92 pkg_config("dbus-glib") { |
| 66 packages = [ "dbus-glib-1" ] | 93 packages = [ "dbus-glib-1" ] |
| 67 } | 94 } |
| 68 } | 95 } |
| 69 | 96 |
| 70 config("common_config") { | 97 config("common_config") { |
| 71 cflags = [] | 98 cflags = [] |
| 72 cflags_cc = [] | 99 cflags_cc = [] |
| 100 defines = [] |
| 101 |
| 73 if (rtc_restrict_logging) { | 102 if (rtc_restrict_logging) { |
| 74 defines = [ "WEBRTC_RESTRICT_LOGGING" ] | 103 defines += [ "WEBRTC_RESTRICT_LOGGING" ] |
| 75 } | 104 } |
| 76 | 105 |
| 77 if (rtc_have_dbus_glib) { | 106 if (rtc_have_dbus_glib) { |
| 78 defines += [ "HAVE_DBUS_GLIB" ] | 107 defines += [ "HAVE_DBUS_GLIB" ] |
| 79 | 108 |
| 80 # TODO(kjellander): Investigate this, it seems like include <dbus/dbus.h> | 109 # TODO(kjellander): Investigate this, it seems like include <dbus/dbus.h> |
| 81 # is still not found even if the execution of | 110 # is still not found even if the execution of |
| 82 # build/config/linux/pkg-config.py dbus-glib-1 returns correct include | 111 # build/config/linux/pkg-config.py dbus-glib-1 returns correct include |
| 83 # dirs on Linux. | 112 # dirs on Linux. |
| 84 all_dependent_configs = [ "dbus-glib" ] | 113 all_dependent_configs = [ "dbus-glib" ] |
| 85 } | 114 } |
| 86 | 115 |
| 87 if (build_with_chromium) { | 116 if (build_with_chromium) { |
| 88 defines += [ "LOGGING_INSIDE_WEBRTC" ] | 117 defines += [ |
| 118 # NOTICE: Since common_inherited_config is used in public_configs for our |
| 119 # targets, there's no point including the defines in that config here. |
| 120 # TODO(kjellander): Cleanup unused ones and move defines closer to the |
| 121 # source when webrtc:4256 is completed. |
| 122 "ENABLE_EXTERNAL_AUTH", |
| 123 "HAVE_OPENSSL_SSL_H", |
| 124 "HAVE_SCTP", |
| 125 "HAVE_SRTP", |
| 126 "HAVE_WEBRTC_VIDEO", |
| 127 "HAVE_WEBRTC_VOICE", |
| 128 "LOGGING_INSIDE_WEBRTC", |
| 129 "SRTP_RELATIVE_PATH", |
| 130 "SSL_USE_OPENSSL", |
| 131 "USE_WEBRTC_DEV_BRANCH", |
| 132 ] |
| 89 } else { | 133 } else { |
| 90 if (is_posix) { | 134 if (is_posix) { |
| 91 # -Wextra is currently disabled in Chromium"s common.gypi. Enable | 135 # -Wextra is currently disabled in Chromium"s common.gypi. Enable |
| 92 # for targets that can handle it. For Android/arm64 right now | 136 # for targets that can handle it. For Android/arm64 right now |
| 93 # there will be an "enumeral and non-enumeral type in conditional | 137 # there will be an "enumeral and non-enumeral type in conditional |
| 94 # expression" warning in android_tools/ndk_experimental"s version | 138 # expression" warning in android_tools/ndk_experimental"s version |
| 95 # of stlport. | 139 # of stlport. |
| 96 # See: https://code.google.com/p/chromium/issues/detail?id=379699 | 140 # See: https://code.google.com/p/chromium/issues/detail?id=379699 |
| 97 if (current_cpu != "arm64" || !is_android) { | 141 if (current_cpu != "arm64" || !is_android) { |
| 98 cflags = [ | 142 cflags = [ |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 if (use_libfuzzer || use_drfuzz) { | 359 if (use_libfuzzer || use_drfuzz) { |
| 316 # This target is only here for gn to discover fuzzer build targets under | 360 # This target is only here for gn to discover fuzzer build targets under |
| 317 # webrtc/test/fuzzers/. | 361 # webrtc/test/fuzzers/. |
| 318 group("webrtc_fuzzers_dummy") { | 362 group("webrtc_fuzzers_dummy") { |
| 319 testonly = true | 363 testonly = true |
| 320 deps = [ | 364 deps = [ |
| 321 "test/fuzzers:webrtc_fuzzer_main", | 365 "test/fuzzers:webrtc_fuzzer_main", |
| 322 ] | 366 ] |
| 323 } | 367 } |
| 324 } | 368 } |
| OLD | NEW |