Skip to content
Snippets Groups Projects
Commit a00d53da authored by Kevin Fitch's avatar Kevin Fitch
Browse files

Add some documentation to FindNanopb.cmake about the new RELPATH option.

parent bb3a1f6f
No related branches found
No related tags found
No related merge requests found
......@@ -28,11 +28,16 @@
# ====================================================================
#
# NANOPB_GENERATE_CPP (public function)
# SRCS = Variable to define with autogenerated
# source files
# HDRS = Variable to define with autogenerated
# header files
# ARGN = proto files
# NANOPB_GENERTAE_CPP(SRCS HDRS [RELPATH <root-path-of-proto-files>]
# <proto-files>...)
# SRCS = Variable to define with autogenerated source files
# HDRS = Variable to define with autogenerated header files
# If you want to use relative paths in your import statements use the RELPATH
# option. The argument to RELPATH should be the directory that all the
# imports will be relative to.
# When RELPATH is not specified then all proto files can be imported without
# a path.
#
#
# ====================================================================
# Example:
......@@ -47,6 +52,19 @@
# include_directories(${CMAKE_CURRENT_BINARY_DIR})
# add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
#
# Example with RELPATH:
# Assume we have a layout like:
# .../CMakeLists.txt
# .../bar.cc
# .../proto/
# .../proto/foo.proto (Which contains: import "sub/bar.proto"; )
# .../proto/sub/bar.proto
# Everything would be the same as the previous example, but the call to
# NANOPB_GENERATE_CPP would change to:
#
# NANOPB_GENERATE_CPP(PROTO_SRCS PROTO_HDRS RELPATH proto
# proto/foo.proto proto/sub/bar.proto)
#
# ====================================================================
#=============================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment