diff options
author | Oliver Lee <oliverzlee@gmail.com> | 2015-02-13 17:28:27 +0100 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2015-02-13 18:42:46 +0200 |
commit | 7c00b90910d4e14e23e027eb951e6f2a8dcfae29 (patch) | |
tree | 07dae73ed586d1a05b5571dc39924d5d7005774a /examples/cmake_simple/README.txt | |
parent | 02bd49bc9379e3062a718b1c16d6e2c23ea2f1a0 (diff) |
Add simple example built with CMake
Diffstat (limited to 'examples/cmake_simple/README.txt')
-rw-r--r-- | examples/cmake_simple/README.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/cmake_simple/README.txt b/examples/cmake_simple/README.txt new file mode 100644 index 00000000..e41b8408 --- /dev/null +++ b/examples/cmake_simple/README.txt @@ -0,0 +1,25 @@ +Nanopb example "simple" using CMake +======================= + +This example is the same as the simple nanopb example but built using CMake. + +Example usage +------------- + +On Linux, create a build directory and then call cmake: + + nanopb/examples/cmake_simple$ mkdir build + nanopb/examples/cmake_simple$ cd build/ + nanopb/examples/cmake_simple/build$ cmake .. + nanopb/examples/cmake_simple/build$ make + +After that, you can run it with the command: ./simple + +#On other platforms, you first have to compile the protocol definition using +#the following command:: +# +# ../../generator-bin/protoc --nanopb_out=. simple.proto +# +#After that, add the following four files to your project and compile: +# +# simple.c simple.pb.c pb_encode.c pb_decode.c |