Webrtc android的编译步骤

首先下载depot_tools

按官方教程来

https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up

$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH=/path/to/depot_tools:$PATH设置depot 的环境变量然后走 fetch webrtc_android的脚本 看官方链接https://webrtc.googlesource.com/src/+/main/docs/native-code/android/
$ fetch --nohooks webrtc_android
$ gclient sync

这步骤操作完后会产生这两个目录

.gclient   # A configuration file for you source checkout
src/       # Top-level Chromium source checkout.

Compiling

首先运行下一些相关依赖

./build/install-build-deps.sh --android
  1. Generate projects using GN.

Make sure your current working directory is src/ of your workspace. Then run:

$ gn gen out/Debug --args='target_os="android" target_cpu="arm64"'

You can specify a directory of your own choice instead of out/Debug, to enable managing multiple configurations in parallel.

  • To build for ARM64: use target_cpu="arm64"
  • To build for 32-bit x86: use target_cpu="x86"
  • To build for 64-bit x64: use target_cpu="x64"
  1. Compile using:
$ autoninja -C out/Debug

你可能感兴趣的:(webrtc)