Also, this only seems to be a functionality provided in CMake 3.7.0,
actually. I neglected to mention that I was experimenting with that branch
when I was studying this problem.
On Monday, November 28, 2016 at 9:47:21 AM UTC-5, Alex Shaver wrote:
>
> When I have several folders
> top
> \ - A
Solution: This doesn't seem to be either documented or intuitive, but this
will solve the problem:
>From the top level directory, specify your proto files relative to that
directory (either listing explicitly, or file(GLOB_RECURSE proto_files
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.proto) if you
I'm just using the default FindProtobuf.cmake commands which have the
protoc step built in to them internally. I tried mailing the cmake list for
support on this, but I didn't receive a response (I'm not sure who
maintains this file). That file may not have the appropriate logic to
handle this
How did you run the protoc command? The generated code corresponds the
import path of the .proto files. For example, if you have a directory like
this:
root
+ project
+ foo
+ bar.proto
Invoking protoc in the root directory with:
protoc --cpp_out=. project/foo/bar.proto
will generate
Issue with approach 3, that I don't understand: Generated header files
create internal implementation functions like :
void protobuf_InitDefaults_Baz_2eproto();
but source files using these functions are looking for:
protobuf_InitDefaults_project_2ffoo_2fBaz_2eproto();
When I compare the resul