we are using protobuf in a very large system, and we simply put all proto files in one directory like "./public/rpc" and it works very well!
On Jun 19, 10:49 am, Justin Muncaster <justin.muncas...@gmail.com> wrote: > Hello, > > I've been using protocol buffers for a while, and I love the library, > however I find that when using them in large projects I generally have to > fight with the compiler to get protoc to play nicely with my build > system. My projects are organized as follows: > > common/foo/foo.h > common/foo/foo.cpp > common/foo/foo.proto > ... > common/bar/bar.h > common/bar/bar.cpp > common/bar/bar.proto > > where bar.proto contains > import "common/foo/foo.proto" > > ... and elsewhere... > app1/baz.proto > ... > app1/fud.proto > > and baz.proto and fud.proto contain > "import common/bar/bar.proto" > > I'm currently changing our build system to be cmake based and I'm again > finding myself fighting with the build system to get the .proto to be > automatically generated in a way where they build correctly. This leads me > to believe that I am doing something wrong or at least not organizing files > in a way that is expected. In light of that, > > How do you organize your proto files when you have many in common > libraries? Do all .proto files live in one folder? Should one avoid "import > a/b/c/d/f.proto"? Do you have any recommendations for how one ought one > setup the cmake build system to work with proto files that are organized as > they are above? Any general recommendations? > > Thanks, > > Justin -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.