• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1set PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%
2set generator32=Visual Studio 14
3set generator64=Visual Studio 14 Win64
4set vcplatform32=win32
5set vcplatform64=x64
6set configuration=Release
7
8echo Building protoc
9cd github\protobuf
10
11echo Update Submodules
12echo This is needed because this build uses CMake <3.13.
13git submodule update --init --recursive
14set ABSL_ROOT_DIR=%cd%\third_party\abseil-cpp
15
16mkdir build32
17cd build32
18cmake -G "%generator32%" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_UNICODE=ON ../cmake
19msbuild protobuf.sln /p:Platform=%vcplatform32% || goto error
20cd ..
21
22mkdir build64
23cd build64
24cmake -G "%generator64%" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_UNICODE=ON ../cmake
25msbuild protobuf.sln /p:Platform=%vcplatform64% || goto error
26cd ..
27
28goto :EOF
29
30:error
31echo Failed!
32exit /b %ERRORLEVEL%
33