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'), ] tbtnavi_dep = [ qt5_dep, dep_qtappfw, grpc_deps ] tbtnavi_headers = [ 'qcheapruler.hpp', 'navigation_client.h', 'file_operation.h', 'AglShellGrpcClient.h' ] moc_files = qt5.compile_moc(headers: tbtnavi_headers, dependencies: qt5_dep) tbtnavi_resources = [ 'images/images.qrc', 'qml/qml.qrc' ] resource_files = qt5.compile_resources(sources: tbtnavi_resources) tbtnavi_src = [ 'main.cpp', 'navigation_client.cpp', 'qcheapruler.cpp', 'file_operation.cpp', 'AglShellGrpcClient.cpp', generated_protoc_sources, generated_grpc_sources, ] executable('tbtnavi', tbtnavi_src, resource_files, moc_files, include_directories: include_directories('../include'), dependencies : tbtnavi_dep, install: true)