diff options
Diffstat (limited to 'test cases/frameworks/5 protocol buffers/meson.build')
-rw-r--r-- | test cases/frameworks/5 protocol buffers/meson.build | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test cases/frameworks/5 protocol buffers/meson.build b/test cases/frameworks/5 protocol buffers/meson.build new file mode 100644 index 0000000..046847a --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/meson.build @@ -0,0 +1,22 @@ +project('protocol buffer test', 'cpp', default_options: ['cpp_std=c++11']) + +protoc = find_program('protoc', required : false) +dep = dependency('protobuf', required : false) + +if not protoc.found() or not dep.found() + error('MESON_SKIP_TEST: protoc tool and/or protobuf pkg-config dependency not found') +endif + + +gen = generator(protoc, \ + output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'], + arguments : ['--proto_path=@CURRENT_SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@']) + +generated = gen.process('defs.proto') +e = executable('prog', 'main.cpp', generated, + dependencies : dep) +test('prototest', e) + +subdir('asubdir') +subdir('withpath') +subdir('sidedir') |