Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
brunexgeek committed Dec 28, 2018
1 parent d142236 commit 9cab642
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,18 @@ add_library(libprotogen_static STATIC
"library/cppgen.cc" )
target_include_directories(libprotogen_static
PUBLIC "include/")
set_target_properties(libprotogen_static PROPERTIES
OUTPUT_NAME "protogen_static"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
PREFIX "lib" )

add_executable(protogen
"compiler/main.cc")
target_link_libraries(protogen libprotogen_static)
set_target_properties(protogen PROPERTIES
OUTPUT_NAME "protogen"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# protogen

Experimental tool to compile ``proto3`` schemas and generate C++ classes which serialize and deserialize JSON messages.
Experimental tool to compile ``proto3`` schemas and generate C++ classes which serialize and deserialize JSON messages. The compiler generates a C++ header file to be included in your program. This file is all you need: no external libraries.

The compiler generates a C++ header file to be included in your program. This file is all you need: no external libraries.
There is also the ``libprotogen_static`` library you can use to create your own compiler or enable your application to compile ``proto3`` to C++.

## Build

Expand All @@ -26,13 +26,13 @@ message Person {
Compile ``.proto`` files using ``protogen`` program:

```
# ./protogen model.proto model.hh
# ./protogen model.proto model.pg.hh
```

Include the generated header file in your source code to use the classes:

```c++
#include "model.hh"
#include "model.pg.hh"

...

Expand Down

0 comments on commit 9cab642

Please sign in to comment.