AglShellGrpcClient: Add support for split windows
[src/agl-shell-activator.git] / meson.build
1 project('agl-shell-activator',
2   'c', 'cpp',
3   version: '0.0.2',
4   default_options: [
5     'warning_level=3',
6     'c_std=c2x',
7     'cpp_std=c++20'
8   ],
9   meson_version: '>= 0.60',
10   license: 'MIT/Expat',
11 )
12
13 pkgconfig = import('pkgconfig')
14 cpp = meson.get_compiler('cpp')
15
16 grpcpp_reflection_dep = cpp.find_library('grpc++_reflection')
17 protoc = find_program('protoc')
18 grpc_cpp = find_program('grpc_cpp_plugin')
19
20
21 add_project_arguments([
22     '-DPACKAGE_STRING="agl-shell-activator @0@"'.format(meson.project_version()),
23     '-D_GNU_SOURCE',
24     '-D_ALL_SOURCE',
25   ],
26   language: 'cpp'
27 )
28
29 protoc_gen = generator(protoc, \
30                        output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'],
31                        arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/src',
32                          '--cpp_out=@BUILD_DIR@',
33                          '@INPUT@'])
34
35 generated_protoc_sources = protoc_gen.process('src/agl_shell.proto')
36
37 grpc_gen = generator(protoc, \
38                      output : ['@BASENAME@.grpc.pb.cc', '@BASENAME@.grpc.pb.h'],
39                      arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/src',
40                        '--grpc_out=@BUILD_DIR@',
41                        '--plugin=protoc-gen-grpc=' + grpc_cpp.path(),
42                        '@INPUT@'])
43 generated_grpc_sources = grpc_gen.process('src/agl_shell.proto')
44
45 grpc_deps = [
46     dependency('protobuf'),
47     dependency('grpc'),
48     dependency('grpc++'),
49     grpcpp_reflection_dep,
50 ]
51
52
53 prefix_path = get_option('prefix')
54 binplugin_dir = join_paths(prefix_path, get_option('bindir'))
55 common_inc = include_directories('include')
56
57 deps_agl_activator = [
58     grpc_deps,
59 ]
60
61 srcs_agl_activator = [
62     'src/main.cpp',
63     'src/AglShellGrpcClient.cpp',
64     'src/AglShellGrpcClient.h',
65     generated_protoc_sources,
66     generated_grpc_sources,
67 ]
68
69 exe_wth_receiver = executable(
70     'agl-shell-activator',
71     srcs_agl_activator,
72     include_directories: common_inc,
73     dependencies: deps_agl_activator,
74     install_rpath: binplugin_dir,
75     install: true
76 )