Build protobuf in Windows

git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive

mkdir bld
cd bld
cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=%CD%/installed -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=ON ../cmake/

If the project which we link with the protobuf.so complains "libprotobuf.so.22 is not found", it means we build protobuf in another way, through ./configure.