README: Add more instructions for specific commits and depot_tools management

This commit is contained in:
Axel Isouard 2017-03-19 10:23:09 +01:00
parent 17ef828ce2
commit 8970f2368b
No known key found for this signature in database
GPG key ID: 4E64BB3EAAF31C29

View file

@ -45,8 +45,8 @@ supported platforms and architectures.
<th align="center">macOS</th>
<td></td>
<td align="center"></td>
<td></td>
<td></td>
<td align="center">-</td>
<td align="center">-</td>
</tr>
<tr>
<th align="center">Windows</th>
@ -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