{"id":13399756,"url":"https://github.com/aisouard/libwebrtc","last_synced_at":"2025-10-27T05:52:06.113Z","repository":{"id":11271867,"uuid":"69021971","full_name":"aisouard/libwebrtc","owner":"aisouard","description":":package: Google's WebRTC implementation in a single static library.","archived":false,"fork":false,"pushed_at":"2022-01-07T22:16:37.000Z","size":278,"stargazers_count":637,"open_issues_count":33,"forks_count":191,"subscribers_count":40,"default_branch":"dev","last_synced_at":"2024-07-31T19:22:12.311Z","etag":null,"topics":["cmake","libwebrtc","linux","macos","webrtc","windows"],"latest_commit_sha":null,"homepage":"https://axel.isouard.fr/libwebrtc","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aisouard.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-23T12:16:58.000Z","updated_at":"2024-07-16T13:44:58.000Z","dependencies_parsed_at":"2022-08-07T06:01:17.902Z","dependency_job_id":null,"html_url":"https://github.com/aisouard/libwebrtc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/aisouard/libwebrtc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aisouard%2Flibwebrtc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aisouard%2Flibwebrtc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aisouard%2Flibwebrtc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aisouard%2Flibwebrtc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aisouard","download_url":"https://codeload.github.com/aisouard/libwebrtc/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aisouard%2Flibwebrtc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281222727,"owners_count":26464003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","libwebrtc","linux","macos","webrtc","windows"],"created_at":"2024-07-30T19:00:42.330Z","updated_at":"2025-10-27T05:52:06.107Z","avatar_url":"https://github.com/aisouard.png","language":"CMake","funding_links":[],"categories":["CMake","Miscellaneous"],"sub_categories":["Tool"],"readme":"# libwebrtc [![License][license-img]][license-href] [![Join the chat at https://gitter.im/aisouard/libwebrtc][gitter-img]][gitter-href] [![Build Status][travis-img]][travis-href] [![Build Status][appveyor-img]][appveyor-href]\n\nThis repository contains a collection of CMake scripts to help you embed\nGoogle's native WebRTC implementation inside your project as simple as this:\n\n```cmake\ncmake_minimum_required(VERSION 3.3)\nproject(sample)\n\nfind_package(LibWebRTC REQUIRED)\ninclude(${LIBWEBRTC_USE_FILE})\n\nset(SOURCE_FILES main.cpp)\nadd_executable(sample ${SOURCE_FILES})\ntarget_link_libraries(sample ${LIBWEBRTC_LIBRARIES})\n```\n\nIt also produces a `pkg-config` file if you prefer the classic way:\n\n```\n$ g++ `pkg-config --cflags LibWebRTC` main.cpp -o main `pkg-config --libs LibWebRTC`\n```\n\n## Status\n\nThe following table displays the current state of this project, including\nsupported platforms and architectures.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003ex86\u003c/td\u003e\n    \u003ctd align=\"center\"\u003ex64\u003c/td\u003e\n    \u003ctd align=\"center\"\u003earm\u003c/td\u003e\n    \u003ctd align=\"center\"\u003earm64\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth align=\"center\"\u003eLinux\u003c/th\u003e\n    \u003ctd align=\"center\"\u003e✔\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✔\u003c/td\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth align=\"center\"\u003emacOS\u003c/th\u003e\n    \u003ctd align=\"center\"\u003e-\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✔\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e-\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e-\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth align=\"center\"\u003eWindows\u003c/th\u003e\n    \u003ctd align=\"center\"\u003e✔\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✔\u003c/td\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Prerequisites\n\n- CMake 3.3 or later\n- Python 2.7 (optional for Windows since it will use the interpreter located\n  inside the `depot_tools` installation)\n\n### Debian \u0026 Ubuntu\n\n- Required development packages:\n\n```\n# apt-get install build-essential libglib2.0-dev libgtk2.0-dev libxtst-dev \\\n                  libxss-dev libpci-dev libdbus-1-dev libgconf2-dev \\\n                  libgnome-keyring-dev libnss3-dev libasound2-dev libpulse-dev \\\n                  libudev-dev\n```\n\n- GCC \u0026 G++ 4.8 or later, for C++11 support\n\n### macOS\n\n- OS X 10.11 or later\n- Xcode 7.3.1 or later\n\n### Windows\n\n- Windows 7 x64 or later\n- Visual Studio 2015 **with updates** - Download the [Installer][vs2015-installer]\n\n  Make sure that you install the following components:\n  \n  - Visual C++, which will select three sub-categories including MFC\n  - Universal Windows Apps Development Tools\n    - Tools (1.4.1) and Windows 10 SDK (**10.0.14393**)\n\n- [Windows 10 SDK][w10sdk] with **Debugging Tools for Windows** or\n  [Windows Driver Kit 10][wdk10] installed in the same Windows 10 SDK\n  installation directory.\n\n## Compiling\n\nClone the repository, create an output directory, browse inside it,\nthen run CMake.\n\n```\n$ git clone https://github.com/aisouard/libwebrtc.git\n$ cd libwebrtc\n$ mkdir out\n$ cd out\n$ cmake ..\n```\n\nWindows users **must** add the Win64 suffix to their Visual Studio generator\nname if they want to build the library for 64-bit platforms, they'll omit it for\n32-bit builds and define the `TARGET_CPU` variable accordingly.\n\n```\n\u003e cmake -G \"Visual Studio 14 2015\" -DTARGET_CPU=x86\n\u003e cmake -G \"Visual Studio 14 2015 Win64\"\n```\n\nThen they'll have to open the `libwebrtc.sln` located inside the current output\ndirectory and build the `ALL_BUILD` project.\n\nUnix users will just have to run the following `make` commands.\n\n```\n$ make\n# make install\n```\n\nThe library will be located inside the `lib` folder of the current output\ndirectory. The `include` folder will contain the header files. CMake scripts\nwill be placed inside the `lib/cmake/LibWebRTC` directory.\n\n## Debug and Release configurations\n\nIf you are using XCode or Visual Studio, you can simply switch between the Debug\nand Release configuration from your IDE. The debugging flags will be\nappended to the generator's parameters.\n\nOtherwise, you must define the `CMAKE_BUILD_TYPE` variable to `Debug`.\n\n```\n$ cmake -DCMAKE_BUILD_TYPE=Debug ..\n```\n\n## Using WebRTC in your project\n\nAt the time of writing this README file, there's no proper way to detect any\ninstallation of the WebRTC library and header files. In the meantime, this CMake\nscript generates and declares a `LibWebRTC` package that will be very easy to\nuse for your projects.\n\nAll you have to do is include the package, then embed the \"use file\" that will\nautomatically find the required libraries, define the proper compiling flags and\ninclude directories.\n\n```cmake\nfind_package(LibWebRTC REQUIRED)\ninclude(${LIBWEBRTC_USE_FILE})\n\ntarget_link_libraries(my-app ${LIBWEBRTC_LIBRARIES})\n```\n\nA pkg-config file is also provided, you can obtain the required compiler and\nlinker flags by specifying `LibWebRTC` as the package name.\n\n```\n$ pkg-config --cflags --libs LibWebRTC\n```\n\n## Fetching a specific revision\n\nThe latest working release will be fetched by default, unless you decide to\nretrieve a specific commit by setting it's hash into the **WEBRTC_REVISION**\nCMake variable, or another branch head ref into the **WEBRTC_BRANCH_HEAD**\nvariable.\n\n```\n$ cmake -DWEBRTC_REVISION=be22d51 ..\n$ cmake -DWEBRTC_BRANCH_HEAD=refs/branch-heads/57 ..\n```\n\nIf both variables are set, it will focus on fetching the commit defined inside\n**WEBRTC_REVISION**.\n\n## Managing depot_tools\n\nCMake will retrieve the latest revision of the `depot_tools` repository. It will\nget the WebRTC repository's commit date, then check-out `depot_tools` to the\ncommit having the closest date to WebRTC's, in order to ensure a high\ncompatibility with `gclient` and other tools.\n\nIt is possible to prevent this behavior by specifying the location to your own\n`depot_tools` repository by defining the **DEPOT_TOOLS_PATH** variable.\n\n```\n$ cmake -DDEPOT_TOOLS_PATH=/opt/depot_tools ..\n```\n\n## Configuration\n\nThe library will be compiled and usable on the same host's platform and\narchitecture. Here are some CMake flags which could be useful if you need to\nperform cross-compiling.\n\n- **BUILD_DEB_PACKAGE**\n\n    Generate Debian package, defaults to OFF, available under Linux only.\n\n- **BUILD_RPM_PACKAGE**\n\n    Generate Red Hat package, defaults to OFF, available under Linux only.\n\n- **BUILD_TESTS**\n\n    Build WebRTC unit tests and mocked classes such as `FakeAudioCaptureModule`.\n\n- **BUILD_SAMPLE**\n\n    Build an executable located inside the `sample` folder.\n\n- **DEPOT_TOOLS_PATH**\n\n    Set this variable to your own `depot_tools` directory. This will prevent\n    CMake from fetching the one matching with the desired WebRTC revision.\n\n- **GN_EXTRA_ARGS**\n\n    Add extra arguments to the `gn gen --args` parameter.\n\n- **NINJA_ARGS**\n\n    Arguments to pass while executing the `ninja` command.\n\n- **TARGET_OS**\n\n    Target operating system, the value will be used inside the `--target_os`\n    argument of the `gn gen` command. The value **must** be one of the following:\n    \n    - `android`\n    - `chromeos`\n    - `ios`\n    - `linux`\n    - `mac`\n    - `nacl`\n    - `win`\n\n- **TARGET_CPU**\n\n    Target architecture, the value will be used inside the `--target_cpu`\n    argument of the `gn gen` command. The value **must** be one of the following:\n    \n    - `x86`\n    - `x64`\n    - `arm`\n    - `arm64`\n    - `mipsel`\n\n- **WEBRTC_BRANCH_HEAD**\n\n    Set the branch head ref to retrieve, it is set to the latest working one.\n    This variable is ignored if **WEBRTC_REVISION** is set.\n\n- **WEBRTC_REVISION**\n\n    Set a specific commit hash to check-out.\n\n## Contributing\n\nFeel free to open an issue if you wish a bug to be fixed, to discuss a new\nfeature or to ask a question. I'm open to pull requests, as long as your\nmodifications are working on the three major OS (Windows, macOS and Linux).\n\nDon't forget to put your name and e-mail address inside the `AUTHORS` file!\nYou can also reach me on [Twitter][twitter] for further discussion.\n\n## Acknowledgements\n\nMany thanks to Dr. Alex Gouaillard for being an excellent mentor for this\nproject.\n\nEverything started from his\n« [Automating libwebrtc build with CMake][webrtc-dr-alex-cmake] » blog article,\nwhich was a great source of inspiration for me to create the easiest way to link\nthe WebRTC library in any native project.\n\n## License\n\nApache License 2.0 © [Axel Isouard][author]\n\n[license-img]:https://img.shields.io/badge/License-Apache%202.0-blue.svg\n[license-href]:https://opensource.org/licenses/Apache-2.0\n[appveyor-img]:https://ci.appveyor.com/api/projects/status/yd1s303md3tt4w9a?svg=true\n[appveyor-href]:https://ci.appveyor.com/project/aisouard/libwebrtc\n[travis-img]:https://travis-ci.org/aisouard/libwebrtc.svg?branch=master\n[travis-href]:https://travis-ci.org/aisouard/libwebrtc\n[gitter-img]:https://badges.gitter.im/aisouard/libwebrtc.svg\n[gitter-href]:https://gitter.im/aisouard/libwebrtc?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n[osx1011sdk]: https://github.com/phracker/MacOSX-SDKs/releases/download/MacOSX10.11.sdk/MacOSX10.11.sdk.tar.xz\n[vs2015-installer]:https://www.microsoft.com/en-US/download/details.aspx?id=48146\n[w10sdk]:https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk\n[wdk10]:https://go.microsoft.com/fwlink/p/?LinkId=526733\n[twitter]:https://twitter.com/aisouard\n[webrtc-dr-alex-cmake]:http://webrtcbydralex.com/index.php/2015/07/22/automating-libwebrtc-build-with-cmake\n[author]:https://axel.isouard.fr\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faisouard%2Flibwebrtc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faisouard%2Flibwebrtc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faisouard%2Flibwebrtc/lists"}