Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nanopb
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
le
nanopb
Commits
a00d53da
Commit
a00d53da
authored
7 years ago
by
Kevin Fitch
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
extra/FindNanopb.cmake
+23
-5
23 additions, 5 deletions
extra/FindNanopb.cmake
with
23 additions
and
5 deletions
extra/FindNanopb.cmake
+
23
−
5
View file @
a00d53da
...
...
@@ -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)
#
# ====================================================================
#=============================================================================
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment