Protobuf generator and bindings for Qt framework

Alexey Edelev ffa3b0f0b7 Remove lambda and std::function usage out of protobuf serializer 5 tahun lalu
3rdparty d4b0e93ab9 Tune windows build procedure 5 tahun lalu
cmake 99b28faada Quick fix Wnd build 5 tahun lalu
examples 99b28faada Quick fix Wnd build 5 tahun lalu
src ffa3b0f0b7 Remove lambda and std::function usage out of protobuf serializer 5 tahun lalu
tests 165bea1188 Migrate to string-numeric conversion for int32/fixed32/sfixed32 types 5 tahun lalu
.gitignore 7495ae7751 Initial version of generator 6 tahun lalu
.gitmodules d4b0e93ab9 Tune windows build procedure 5 tahun lalu
CMakeLists.txt 1f62e52a88 Fix linking issue 5 tahun lalu
Doxyfile.in a29546b851 Unify doxy comments style 5 tahun lalu
LICENSE 3beab4ea24 Implement move semantic for generated classes, update copyrights. 6 tahun lalu
ProjectConfig.cmake.in b289fe37b4 Fix cmake dependencies for file generation 5 tahun lalu
README.md 17028450bf Add possibility to switch serializer for basic types 5 tahun lalu

README.md

QtProtobuf

Protobuf plugin to generate Qt classes

Linux Build

Prerequesties

Check installation of protobuf and grpc in your system. Minimum required versions are protobuf-3.6.0 and grpc-1.15.0.

Note: Older versions could be supported as well but not officially tested.

All-in-one build

If required versions of libraries are not found in your system, you may use all-in-one build procedure for prerequesties

Update submodules to fetch 3rdparty dependencies:

git submodule update --init --recursive

Build

mkdir build
cd build
cmake ..
cmake --build . [--config <RELEASE|DEBUG>] -- -j<N>

Windows Build

Prerequesties

Download and install:

  • Qt 5.12.3 or higher 1
  • cmake-3.1 or higher 2
  • Strawberry perl 5.28 3
  • GoLang 1.10 or higher 4
  • Yasm 1.3 or higher 5
  • Actual Visual Studio Compiler with cmake support that required by Qt 6

Note: All applications should be in PATH

Update submodules to fetch 3rdparty dependencies:

git submodule update --init --recursive

Build

Open Qt MSVC command line and follow steps:

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
cd <directory with qtprotobuf project>
mkdir build
cd build
cmake ..
cmake --build . [--config <RELEASE|DEBUG>] -- /m:<N>

Note: 64-bit build is not supported yet

Usage

protoc --plugin=protoc-gen-qtprotobuf=<path/to/bin>/qtprotobufgen --qtprotobuf_out=<output_dir> <protofile>.proto [--qtprotobuf_opt=out=<output_dir>]

Running tests

cd <build directory>
ctest