diff options
Diffstat (limited to 'app/meson.build')
-rw-r--r-- | app/meson.build | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/app/meson.build b/app/meson.build index 864edb7..a7d1e41 100644 --- a/app/meson.build +++ b/app/meson.build @@ -1,6 +1,33 @@ cpp = meson.get_compiler('cpp') qt5_dep = dependency('qt5', modules: ['Qml', 'Quick', 'Gui', 'Location']) +grpcpp_reflection_dep = cpp.find_library('grpc++_reflection') +protoc = find_program('protoc') +grpc_cpp = find_program('grpc_cpp_plugin') + +protoc_gen = generator(protoc, \ + output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'], + arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/protocol', + '--cpp_out=@BUILD_DIR@', + '@INPUT@']) + +generated_protoc_sources = protoc_gen.process('protocol/agl_shell.proto') + +grpc_gen = generator(protoc, \ + output : ['@BASENAME@.grpc.pb.cc', '@BASENAME@.grpc.pb.h'], + arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/protocol', + '--grpc_out=@BUILD_DIR@', + '--plugin=protoc-gen-grpc=' + grpc_cpp.path(), + '@INPUT@']) +generated_grpc_sources = grpc_gen.process('protocol/agl_shell.proto') + +grpc_deps = [ + dependency('protobuf'), + dependency('grpc'), + dependency('grpc++'), + grpcpp_reflection_dep, +] + dep_qtappfw = [ dependency('qtappfw-navigation'), dependency('qtappfw-vehicle-signals'), @@ -9,12 +36,14 @@ dep_qtappfw = [ tbtnavi_dep = [ qt5_dep, dep_qtappfw, + grpc_deps ] tbtnavi_headers = [ 'qcheapruler.hpp', 'navigation_client.h', - 'file_operation.h' + 'file_operation.h', + 'AglShellGrpcClient.h' ] moc_files = qt5.compile_moc(headers: tbtnavi_headers, @@ -31,7 +60,10 @@ tbtnavi_src = [ 'main.cpp', 'navigation_client.cpp', 'qcheapruler.cpp', - 'file_operation.cpp' + 'file_operation.cpp', + 'AglShellGrpcClient.cpp', + generated_protoc_sources, + generated_grpc_sources, ] executable('tbtnavi', tbtnavi_src, resource_files, moc_files, |