From 8970f2368b030f1fc1a441fc455bedda8e4e143d Mon Sep 17 00:00:00 2001 From: Axel Isouard Date: Sun, 19 Mar 2017 10:23:09 +0100 Subject: [PATCH] README: Add more instructions for specific commits and depot_tools management --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 24527aa..88972c0 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,8 @@ supported platforms and architectures. macOS ✔ - - + - + - Windows @@ -146,6 +146,35 @@ linker flags by specifying `LibWebRTC` as the package name. $ pkg-config --cflags --libs LibWebRTC ``` +## Fetching a specific revision + +The latest working release will be fetched by default, unless you decide to +retrieve a specific commit by setting it's hash into the **WEBRTC_REVISION** +CMake variable, or another branch head ref into the **WEBRTC_BRANCH_HEAD** +variable. + +``` +$ cmake -DWEBRTC_REVISION=be22d51 .. +$ cmake -DWEBRTC_BRANCH_HEAD=refs/branch-heads/57 .. +``` + +If both variables are set, it will focus on fetching the commit defined inside +**WEBRTC_REVISION**. + +## Managing depot_tools + +CMake will retrieve the latest revision of the `depot_tools` repository. It will +get the WebRTC repository's commit date, then check-out `depot_tools` to the +commit having the closest date to WebRTC's, in order to ensure a high +compatibility with `gclient` and other tools. + +It is possible to prevent this behavior by specifying the location to your own +`depot_tools` repository by defining the **DEPOT_TOOLS_PATH** variable. + +``` +$ cmake -DDEPOT_TOOLS_PATH=/opt/depot_tools .. +``` + ## Configuration The library will be compiled and usable on the same host's platform and @@ -174,6 +203,10 @@ perform cross-compiling. Set this variable to your own `depot_tools` directory. This will prevent CMake from fetching the one matching with the desired WebRTC revision. +- **GN_EXTRA_ARGS** + + Add extra arguments to the `gn gen --args` parameter. + - **NINJA_ARGS** Arguments to pass while executing the `ninja` command. For instance, you can @@ -206,6 +239,15 @@ perform cross-compiling. - `arm64` - `mipsel` +- **WEBRTC_BRANCH_HEAD** + + Set the branch head ref to retrieve, it is set to the latest working one. + This variable is ignored if **WEBRTC_REVISION** is set. + +- **WEBRTC_REVISION** + + Set a specific commit hash to check-out. + ## Contributing Feel free to open an issue if you wish a bug to be fixed, to discuss a new