summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorkjellander@webrtc.org <kjellander@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-06-17 08:54:03 +0000
committerkjellander@webrtc.org <kjellander@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-06-17 08:54:03 +0000
commitd6d5bffab60c9fc3413ded251aa8513346d252c4 (patch)
tree2a9d0751151b746c5a54e51883a217c5bfc15598 /build
parente78505f9d86ba3d45bed447c52459770ab04b140 (diff)
downloadwebrtc-d6d5bffab60c9fc3413ded251aa8513346d252c4.tar.gz
Initial GN work for WebRTC
This CL makes it possible to build the 'webrtc_base' target using GN. The majority of our GYP stuff in webrtc/build/common.gypi has been translated into the configs of webrtc/BUILD.gn. The webrtc/base/base.gyp file is translated into webrtc/base/BUILD.gn. This CL depends on https://codereview.chromium.org/322373002/ for the jsoncpp BUILD.gn file and the ssl config. To build inside Chromium, https://codereview.chromium.org/321313006/ needs to be landed first. BUG=webrtc:3441 TEST= Successful compilation of WebRTC as standalone: gn gen out/Default --args="build_with_chromium=false" && ninja -C out/Default gn gen out/Default --args="build_with_chromium=false is_clang=true" && ninja -C out/Default I also ran: gn gen out/Default --args="build_with_chromium=false have_dbus_glib=true" but it fails to compile: something is probably wrong with with pkg-config for that. For Chromium, I symlinked src/third_party/webrtc to the webrtc subfolder of the WebRTC checkout and applied the following patches: https://codereview.chromium.org/322373002 (for jsoncpp and ssl config) https://codereview.chromium.org/321313006 (enable building WebRTC) Then I built successfully using: gn gen out/Default && ninja -C out/Default webrtc_base R=brettw@chromium.org TBR=niklas.enbom@webrtc.org Review URL: https://webrtc-codereview.appspot.com/17669004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6461 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'build')
-rw-r--r--build/webrtc.gni57
1 files changed, 57 insertions, 0 deletions
diff --git a/build/webrtc.gni b/build/webrtc.gni
new file mode 100644
index 00000000..e269a262
--- /dev/null
+++ b/build/webrtc.gni
@@ -0,0 +1,57 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+declare_args() {
+ # Assume Chromium build for now, since that's the priority case for getting GN
+ # up and running with WebRTC.
+ build_with_chromium = true
+ build_with_libjingle = true
+
+ if (build_with_libjingle) {
+ include_tests = false
+ restrict_webrtc_logging = true
+ } else {
+ include_tests = true
+ restrict_webrtc_logging = false
+ }
+
+ # Adds video support to dependencies shared by voice and video engine.
+ # This should normally be enabled; the intended use is to disable only
+ # when building voice engine exclusively.
+ enable_video = true
+
+ # Selects fixed-point code where possible.
+ prefer_fixed_point = false
+
+ build_libjpeg = true
+ # Enables the use of protocol buffers for debug recordings.
+ enable_protobuf = true
+
+ # Disable by default.
+ have_dbus_glib = false
+
+ # Enable to use the Mozilla internal settings.
+ build_with_mozilla = false
+
+ # Define MIPS architecture variant, MIPS DSP variant and MIPS FPU
+ # This may be subject to change in accordance to Chromium's MIPS flags
+ mips_arch_variant = "mips32r1"
+ mips_dsp_rev = 0
+ mips_fpu = true
+
+ enable_android_opensl = true
+
+ if (is_ios) {
+ build_libjpeg = false
+ enable_protobuf = false
+ }
+
+ if (cpu_arch == "arm") {
+ prefer_fixed_point = true
+ }
+}