build.bat 713 B

123456789101112131415161718192021222324252627
  1. set PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%
  2. set generator32=Visual Studio 14
  3. set generator64=Visual Studio 14 Win64
  4. set vcplatform32=win32
  5. set vcplatform64=x64
  6. set configuration=Release
  7. echo Building protoc
  8. cd github\protobuf
  9. mkdir build32
  10. cd build32
  11. cmake -G "%generator32%" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_UNICODE=ON ../cmake
  12. msbuild protobuf.sln /p:Platform=%vcplatform32% || goto error
  13. cd ..
  14. mkdir build64
  15. cd build64
  16. cmake -G "%generator64%" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_UNICODE=ON ../cmake
  17. msbuild protobuf.sln /p:Platform=%vcplatform64% || goto error
  18. cd ..
  19. goto :EOF
  20. :error
  21. echo Failed!
  22. exit /b %ERRORLEVEL%