-
Create and run Shell-Script (e.g. with cmd.exe):
#!/bin/bash # Protobuf 3.14.0 cd C:/tmp curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protobuf-cpp-3.14.0.zip unzip -qq protobuf-cpp-3.14.0.zip cd protobuf-3.14.0/cmake mkdir -p build-dir && cd build-dir && rm -r * "C:/Program Files/CMake/bin/cmake.exe" \ -G "Visual Studio 15 2017" \ -DCMAKE_INSTALL_PREFIX:PATH=C:/protobuf-3.14 \ -DCMAKE_SHARED_LINKER_FLAGS:STRING=/machine:x64 \ -DCMAKE_STATIC_LINKER_FLAGS:STRING=/machine:x64 \ -DCMAKE_EXE_LINKER_FLAGS:STRING=/machine:x64 \ -DCMAKE_MODULE_LINKER_FLAGS:STRING=/machine:x64 \ -DCMAKE_GENERATOR_PLATFORM:INTERNAL=x64 \ -Dprotobuf_WITH_ZLIB:BOOL=OFF \ -Dprotobuf_BUILD_TESTS:BOOL=OFF \ ..
-
Run extract_includes.bat located in build-dir from above
-
Open protobuf.sln located in build-dir from above with Visual Studio 2017
-
Change Properties->C/C++->Code Generation of all solutions for Configuration Release AND Debug
-
Build Solution for Release AND for Debug
-
Build INSTALL for Release AND for Debug