[gnome-builder/wip/gtk4-port] plugins/meson: fix build target parameter



commit 41bb45ec842b2f21086ac28b08ad5d7acfcb703f
Author: Christian Hergert <chergert redhat com>
Date:   Tue May 10 15:01:33 2022 -0700

    plugins/meson: fix build target parameter
    
    This needs to be relative to the build directory (and actually be inside
    the build directory).

 src/plugins/meson/gbp-meson-pipeline-addin.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/meson/gbp-meson-pipeline-addin.c b/src/plugins/meson/gbp-meson-pipeline-addin.c
index b7f3f15fa..741befcb3 100644
--- a/src/plugins/meson/gbp-meson-pipeline-addin.c
+++ b/src/plugins/meson/gbp-meson-pipeline-addin.c
@@ -77,12 +77,11 @@ on_build_stage_query (IdePipelineStage *stage,
 
           if (GBP_IS_MESON_BUILD_TARGET (target))
             {
-              const gchar *filename;
+              const char *builddir = ide_pipeline_get_builddir (pipeline);
+              const char *filename = gbp_meson_build_target_get_filename (GBP_MESON_BUILD_TARGET (target));
 
-              filename = gbp_meson_build_target_get_filename (GBP_MESON_BUILD_TARGET (target));
-
-              if (filename != NULL)
-                ide_subprocess_launcher_push_argv (launcher, filename);
+              if (filename != NULL && g_str_has_prefix (filename, builddir))
+                ide_subprocess_launcher_push_argv (launcher, g_path_skip_root (filename + strlen 
(builddir)));
             }
         }
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]