layout: Determine xwayland surface in a generic fashion
[src/agl-compositor.git] / grpc-proxy / meson.build
1 dep_wayland_client = dependency('wayland-client', version: '>= 1.17.0')
2
3 grpcpp_reflection_dep = cxx.find_library('grpc++_reflection')
4 protoc = find_program('protoc')
5 grpc_cpp = find_program('grpc_cpp_plugin')
6
7 protoc_gen = generator(protoc, \
8                        output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'],
9                        arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/',
10                          '--cpp_out=@BUILD_DIR@',
11                          '@INPUT@'])
12
13 generated_protoc_sources = protoc_gen.process('agl_shell.proto')
14
15 grpc_gen = generator(protoc, \
16                      output : ['@BASENAME@.grpc.pb.cc', '@BASENAME@.grpc.pb.h'],
17                      arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/',
18                        '--grpc_out=@BUILD_DIR@',
19                        '--plugin=protoc-gen-grpc=' + grpc_cpp.path(),
20                        '@INPUT@'])
21 generated_grpc_sources = grpc_gen.process('agl_shell.proto')
22
23 grpc_deps = [
24     dependency('protobuf'),
25     dependency('grpc'),
26     dependency('grpc++'),
27     grpcpp_reflection_dep,
28 ]
29
30 srcs = [
31       'main-grpc.cpp',
32       'grpc-async-cb.cpp',
33       'shell.cpp',
34       generated_protoc_sources,
35       generated_grpc_sources,
36       agl_shell_client_protocol_h,
37       agl_shell_protocol_c,
38 ]
39
40 executable(
41     'agl-shell-grpc-server', srcs,
42     include_directories: [ common_inc ],
43     dependencies: [ grpc_deps, dep_wayland_client, libweston_dep ],
44     install: true,
45     install_dir: dir_module_agl_compositor,
46 )