Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out how to use protobufs with meson #4

Open
sarum9in opened this issue Feb 6, 2018 · 0 comments
Open

Figure out how to use protobufs with meson #4

sarum9in opened this issue Feb 6, 2018 · 0 comments
Labels

Comments

@sarum9in
Copy link
Member

sarum9in commented Feb 6, 2018

github.com/meson/mesonbuild does not support protocol buffers well. There is a way to make generator but it is impossible to specify dependencies in a sane way. Also it is not clear how to include headers from generator output.

protoc = find_program('protoc')
protoc_cpp_gen = generator(protoc,
    output    : ['@[email protected]',
                 '@[email protected]'],
    arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/include',
                 '--cpp_out=@BUILD_DIR@', '@INPUT@'])

# To generate
srcs = protoc_cpp_gen.process(
    full_path_to_protos,
    preserve_path_from : join_paths(meson.current_source_dir(), 'include'),
)
@sarum9in sarum9in added the meson label Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant