diff options
Diffstat (limited to 'src/meson.build')
-rw-r--r-- | src/meson.build | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/src/meson.build b/src/meson.build index f44aef3..4a6f170 100644 --- a/src/meson.build +++ b/src/meson.build @@ -14,14 +14,45 @@ # limitations under the License. # +cpp = meson.get_compiler('cpp') +grpcpp_reflection_dep = cpp.find_library('grpc++_reflection') + +applaunchd_dbus_deps = [ + dependency('gobject-2.0'), + dependency('gio-unix-2.0'), + dependency('libsystemd'), +] + applaunchd_deps = [ dependency('gobject-2.0'), dependency('gio-unix-2.0'), dependency('libsystemd'), + dependency('protobuf'), + dependency('grpc'), + dependency('grpc++'), + grpcpp_reflection_dep, ] +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@/../protos', + '--cpp_out=@BUILD_DIR@', + '@INPUT@']) +generated_protoc_sources = protoc_gen.process('../protos/applauncher.proto') + +grpc_gen = generator(protoc, \ + output : ['@BASENAME@.grpc.pb.cc', '@BASENAME@.grpc.pb.h'], + arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/../protos', + '--grpc_out=@BUILD_DIR@', + '--plugin=protoc-gen-grpc=' + grpc_cpp.path(), + '@INPUT@']) +generated_grpc_sources = grpc_gen.process('../protos/applauncher.proto') + executable ( - 'applaunchd', + 'applaunchd-dbus', config_h, [ generated_dbus_sources, @@ -29,9 +60,31 @@ executable ( 'app_info.c', 'app_info.h', 'app_launcher.c', 'app_launcher.h', 'systemd_manager.c', 'systemd_manager.h', + 'gdbus/systemd1_manager_interface.c', + 'gdbus/systemd1_unit_interface.c', + 'utils.c', 'utils.h', + ], + dependencies : applaunchd_dbus_deps, + include_directories : include_directories('.', 'gdbus'), + install : true +) + +executable ( + 'applaunchd', + config_h, + [ + generated_dbus_sources, + generated_protoc_sources, + generated_grpc_sources, + 'main-grpc.cc', + 'AppLauncherImpl.cc', + 'app_info.c', 'app_info.h', + 'systemd_manager.c', 'systemd_manager.h', + 'gdbus/systemd1_manager_interface.c', + 'gdbus/systemd1_unit_interface.c', 'utils.c', 'utils.h', ], dependencies : applaunchd_deps, - include_directories : include_directories('..'), + include_directories : include_directories('.', 'gdbus'), install : true ) |