Separating header and source files after compiling .proto with Protocol Buffers

1.7k Views Asked by At

I'm working on the project with the a structure similar to the following:

root/inc/foo/bar/
root/src

I've just started to use Google Protocol Buffers and when I compile the code I found that I need add foo/bar/file.h to the file.cc file in order for the code to find the header. I don't plan to commit the .h and .cc files to the repo since they get automatically generated. Is there a parameter I can give protoc to seperate the header/source files into different directories and add the correct path to the source file #includes?

1

There are 1 best solutions below

1
On

Maybe you could append a script "mv foo.h foofolder/" after executing the protoc