webrtc编译命令

cd D:\webrtc\webrtc-checkout\src
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set GYP_GENERATORS=msvs-ninja,ninja
set GYP_DEFINES=component=shared_library
set GYP_MSVS_VERSION=2015
gn gen out/Release --ide=vs2015 --args="is_debug=false target_cpu=\"x86\" proprietary_codecs=true"
ninja -C out/Release

gn args out/Release --list=rtc_use_h264

生成release版ninja项目文件:gn gen out/Default --args='is_debug=false'
清空ninja项目文件:gn clean out/Default


ninja -C out/Default

git branch -r #查看release分支

编译特定模块
https://blog.csdn.net/foruok/article/details/69525039


使用下列命令,可以编译特定模块:

ninja pc (针对 mediasession.cc )
ninja media (针对 internalencoderfactory.cc 和 webrtcvideoengine2.cc )
ninja ffmpeg (针对 ffmpeg )


如果你已经使用 gn gen 生成过构建文件,想看看这个版本的构建文件都指定了什么参数,可以使用下面命令:
gn args out/Release --list
它会列出所有的 build arguments 和对应的文档,以及当前值。

libcpp_is_static

gn gen out/Release --ide=vs2015 --args="is_debug=false target_cpu=\"x86\" libcpp_is_static=false component=\"shared_library\" "


gn

https://blog.csdn.net/foruok/article/details/70050342

MultiThreadedDLL

<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>


Summary of my investigations:

a) It is possible to compile libwebrtc with -MD flags. This is not possible without modifying the sources, but the modification is trivial: change src/build/config/win/BUILD.gn: in the statement config("default_crt") replace

#Desktop Windows: static CRT
configs = [":static_crt"]

to configs = [":dynamic_crt"]

b) It is possible to recompile Qt from sources with -MT -MTd flags. To do this: edit Src/qtbase/mkspecs/common/msvc-desktop.conf, replace -MD -MDd in this file with -MT -MTd. configure with option
 

猜你喜欢

转载自blog.csdn.net/fanhenghui/article/details/80871657