Fix include paths in generated headers
Instead of '#include "include/perfetto/..."' the generated proto header
files should use '#include "perfetto/...' as regular headers. Otherwise
they can't be included from a project embedding Perfetto.
Change-Id: I44dbf28f780feea4220e7a25004a541291bdf306
diff --git a/tools/gen_tracing_cpp_headers_from_protos.py b/tools/gen_tracing_cpp_headers_from_protos.py
index 1ec4a95..c27a775 100755
--- a/tools/gen_tracing_cpp_headers_from_protos.py
+++ b/tools/gen_tracing_cpp_headers_from_protos.py
@@ -25,6 +25,7 @@
HEADER_PATH = 'include/perfetto/tracing/core'
CPP_PATH = 'src/tracing/core'
+INCLUDE_PATH = 'perfetto/tracing/core'
def run(cmd):
@@ -45,7 +46,7 @@
if not os.path.exists(tool):
print('Could not find %s, run ninja -C %s proto_to_cpp' % (tool, out_dir))
for proto in PROTOS:
- run([tool, proto] + [HEADER_PATH, CPP_PATH])
+ run([tool, proto] + [HEADER_PATH, CPP_PATH, INCLUDE_PATH])
fname = os.path.basename(proto).replace('.proto', '')
run(clang_format + [os.path.join(HEADER_PATH, fname + '.h')])
run(clang_format + [os.path.join(CPP_PATH, fname + '.cc')])