From cb31f7fdbc6068dd53a6e8e19888badd98607d48 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Tue, 27 Jul 2021 13:23:42 +0100 Subject: [PATCH] build: Separate most of pv-wrap into a convenience library Signed-off-by: Simon McVittie <smcv@collabora.com> --- pressure-vessel/meson.build | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/pressure-vessel/meson.build b/pressure-vessel/meson.build index 552a35bbb..2838ba1d8 100644 --- a/pressure-vessel/meson.build +++ b/pressure-vessel/meson.build @@ -208,8 +208,8 @@ executable( install_rpath : pv_rpath, ) -executable( - 'pressure-vessel-wrap', +pressure_vessel_wrap_lib = static_library( + 'pressure-vessel-wrap-lib', sources : [ 'bwrap.c', 'bwrap.h', @@ -228,7 +228,6 @@ executable( 'graphics-provider.h', 'runtime.c', 'runtime.h', - 'wrap.c', 'wrap-flatpak.c', 'wrap-flatpak.h', 'wrap-pipewire.c', @@ -246,6 +245,24 @@ executable( json_glib, ], include_directories : pv_include_dirs, +) +pressure_vessel_wrap_lib_dep = declare_dependency( + link_with : pressure_vessel_wrap_lib, + sources : [launcher1[1], systemd_dbus[1]], +) + +executable( + 'pressure-vessel-wrap', + sources : [ + 'wrap.c', + ], + c_args : pv_c_args, + dependencies : [ + gio_unix, + libglnx_dep, + pressure_vessel_wrap_lib_dep, + ], + include_directories : pv_include_dirs, install : true, install_dir : pv_bindir, build_rpath : pv_rpath, -- GitLab