From 9cab64295424a5e6165c74b288f9daf9b385fad3 Mon Sep 17 00:00:00 2001 From: Bruno Ribeiro Date: Fri, 28 Dec 2018 09:29:21 -0200 Subject: [PATCH] Update README.md --- CMakeLists.txt | 11 +++++++++++ README.md | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4cacf74..9cd1670 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}" ) \ No newline at end of file diff --git a/README.md b/README.md index 0c34c7e..66104cd 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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" ...