Windows下Google Protobuf Visual Studio自动编译脚本示例
程序员文章站
2022-06-17 08:45:55
...
直接上protobuf2.x和protobuf3.x命令行自动编译脚本:
@echo off
set PATH=D:\Android\Microsoft Visual Studio 12.0\Common7\IDE;%PATH%
call "D:\Android\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
echo "build protobuf 2.x ..."
cd vsprojects
rem devenv.exe protobuf.sln /upgrade
rem devenv.exe protobuf.sln /rebuild "Release|x64"
MSBuild protobuf.sln /t:Rebuild /p:Platform=x64 /p:Configuration=Release
cd ..
pause
以及:
@echo off
set PATH=D:\Android\Microsoft Visual Studio 12.0\Common7\IDE;%PATH%
call "D:\Android\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
echo "build protobuf 3.x ..."
md cmake\build
cd cmake\build
cmake -G"Visual Studio 12 2013 Win64" ..
rem cmake --build .
rem devenv.exe protobuf.sln /rebuild "Release|x64"
rem MSBuild protobuf.sln /t:Rebuild /p:Platform=x64 /p:Configuration=Release
cd ..\..
pause